Skip to content

Commit

Permalink
Fixing Codacity issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kirienko committed Mar 27, 2019
1 parent 7cd3e28 commit f02af0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
PyDSDL
======
# PyDSDL

[![Travis CI](https://travis-ci.org/UAVCAN/pydsdl.svg?branch=master)](https://travis-ci.org/UAVCAN/pydsdl)
[![Coverage Status](https://coveralls.io/repos/github/UAVCAN/pydsdl/badge.svg)](https://coveralls.io/github/UAVCAN/pydsdl)
Expand Down Expand Up @@ -32,7 +31,6 @@ they need not be installed by the user):
- [Parsimonious](https://github.com/erikrose/parsimonious) by Erik Rose, MIT license.
- [Six](https://github.com/benjaminp/six) by Benjamin Peterson, MIT license; needed for Parsimonious.


## Library API

The library API is very simple, all of its entities are visible in `__init__.py`.
Expand Down Expand Up @@ -92,9 +90,9 @@ response structure of the service type, respectively.
Every data type (i.e., the `DataType` root class) has the following public attributes
(although they raise `TypeError` when used against an instance of `ServiceType`):

- `bit_length_range: Tuple[int, int]` - returns a named tuple containing `min:int` and `max:int`, in bits,
- `bit_length_range: Tuple[int, int]` - returns a named tuple containing `min:int` and `max:int`, in bits,
which represent the minimum and the maximum possible bit length of an encoded representation.
- `compute_bit_length_values() -> Set[int]` - this function performs a bit length combination analysis on
- `compute_bit_length_values() -> Set[int]` - this function performs a bit length combination analysis on
the data type and returns a full set of bit lengths of all possible valid encoded representations of the data type.
Due to the involved computations, the function can be expensive to invoke, so use with care.

Expand Down
1 change: 0 additions & 1 deletion pydsdl/_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@ def _define(rel_path: str, text: str) -> None:

def _unittest_parse_namespace_versioning() -> None:
from pytest import raises
import tempfile
import glob
directory = tempfile.TemporaryDirectory()

Expand Down
2 changes: 1 addition & 1 deletion pydsdl/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _ensure_minor_version_compatibility(types: typing.List[data_type.CompoundTyp
for t in types:
by_name[t.full_name].append(t)

for name, definitions in by_name.items():
for definitions in by_name.values():
by_major = collections.defaultdict(list) # type: typing.DefaultDict[int, typing.List[data_type.CompoundType]]
for t in definitions:
by_major[t.version.major].append(t)
Expand Down

0 comments on commit f02af0b

Please sign in to comment.