mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-30 18:37:15 +02:00
fix: bugs introduced by the flake8 recommendations fixed and those warnings are ignored from now on
This commit is contained in:
7
.flake8
7
.flake8
@ -1,2 +1,9 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
|
ignore =
|
||||||
|
# comparison to None should be 'if cond is None:'
|
||||||
|
E711,
|
||||||
|
# comparison to True should be 'if cond is True:' or 'if cond:'
|
||||||
|
E712,
|
||||||
|
# line break before binary operator
|
||||||
|
W503
|
||||||
|
@ -147,7 +147,7 @@ class MPUnitsConan(ConanFile):
|
|||||||
|
|
||||||
# check compiler version
|
# check compiler version
|
||||||
min_version = feature["compiler"].get(str(compiler))
|
min_version = feature["compiler"].get(str(compiler))
|
||||||
if min_version is None:
|
if min_version == None:
|
||||||
# not tested compiler being used - use at your own risk
|
# not tested compiler being used - use at your own risk
|
||||||
return
|
return
|
||||||
if min_version == "":
|
if min_version == "":
|
||||||
@ -166,7 +166,7 @@ class MPUnitsConan(ConanFile):
|
|||||||
feature = self._feature_compatibility[feature_name]
|
feature = self._feature_compatibility[feature_name]
|
||||||
min_version = feature["compiler"].get(str(compiler))
|
min_version = feature["compiler"].get(str(compiler))
|
||||||
return bool(
|
return bool(
|
||||||
opt is True
|
opt == True
|
||||||
or (
|
or (
|
||||||
opt == "auto"
|
opt == "auto"
|
||||||
and min_version
|
and min_version
|
||||||
@ -211,7 +211,7 @@ class MPUnitsConan(ConanFile):
|
|||||||
def validate(self):
|
def validate(self):
|
||||||
self._check_feature_supported("mp-units", "minimum_support")
|
self._check_feature_supported("mp-units", "minimum_support")
|
||||||
for key, value in self._option_feature_map.items():
|
for key, value in self._option_feature_map.items():
|
||||||
if self.options.get_safe(key) is True:
|
if self.options.get_safe(key) == True:
|
||||||
self._check_feature_supported(key, value)
|
self._check_feature_supported(key, value)
|
||||||
|
|
||||||
def layout(self):
|
def layout(self):
|
||||||
|
Reference in New Issue
Block a user