Skip to content

Commit

Permalink
Fixed new formatting issues raised by flake8 5.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Aug 4, 2022
1 parent 6d675b9 commit b1b09a2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Released: not yet
to the 'pywbem' namespace.
(issue #2888).

* Fixed new formatting issues raised by flake8 5.0.

**Enhancements:**

**Cleanup:**
Expand Down
8 changes: 4 additions & 4 deletions pywbem_mock/_inmemoryrepository.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ def iter_names(self):
for name in six.iterkeys(self._data):
if self._copy_names:
# Using .copy is sufficient for CIMNamespace name.
yield(name.copy())
yield name.copy()
else:
yield(name)
yield name

def iter_values(self, copy=True):
for value in six.itervalues(self._data):
if copy:
yield(deepcopy(value))
yield deepcopy(value)
else:
yield(value)
yield value

def len(self):
return len(self._data)
Expand Down
12 changes: 6 additions & 6 deletions tests/unittest/pywbem/test_mof_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2326,15 +2326,15 @@ def expected_classes():
"""The classes expected to be directly compiled from the schema_mof
above
"""
return('CIM_RegisteredProfile', 'CIM_ObjectManager',
'CIM_ElementConformsToProfile', 'CIM_ReferencedProfile',
'CIM_LocalFileSystem')
return ('CIM_RegisteredProfile', 'CIM_ObjectManager',
'CIM_ElementConformsToProfile', 'CIM_ReferencedProfile',
'CIM_LocalFileSystem')

@staticmethod
def expected_dependent_classes():
""" Return tuple of expected dependent classes from the compile"""
return('CIM_ManagedElement', 'CIM_WBEMService', 'CIM_Service',
'CIM_RegisteredSpecification')
return ('CIM_ManagedElement', 'CIM_WBEMService', 'CIM_Service',
'CIM_RegisteredSpecification')

def test_build_from_partial_schema(self):
"""
Expand Down Expand Up @@ -2858,7 +2858,7 @@ class TST_Person{
test_namespace = 'root/test'
try:
self.mofcomp.compile_string(mof_str, test_namespace)
assert(False)
assert False
except MOFParseError:
pass

Expand Down
2 changes: 1 addition & 1 deletion tests/unittest/pywbem_mock/test_wbemconnection_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def model_path(inst_path):
model_path = inst_path.copy()
model_path.host = None
model_path.namespace = None
return(model_path)
return model_path


def equal_model_path(p1, p2):
Expand Down

0 comments on commit b1b09a2

Please sign in to comment.