Skip to content

Commit

Permalink
Get flake8 linting passing
Browse files Browse the repository at this point in the history
  • Loading branch information
sirosen committed Dec 22, 2023
1 parent 7c6d54f commit d7c997d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
exclude = .git,.tox,__pycache__,.eggs,dist,.venv*,docs,build
max-line-length = 88
extend-ignore = W503,W504,E203
extend-ignore = W503,W504,E203,B011
2 changes: 1 addition & 1 deletion nose2/plugins/loader/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def isTestMethod(attrname, testCaseClass=testCaseClass, excluded=excluded):
prefix = evt.testMethodPrefix or self.session.testMethodPrefix
return (
attrname.startswith(prefix)
and hasattr(getattr(testCaseClass, attrname), "__call__")
and attrname not in excluded
and callable(getattr(testCaseClass, attrname))
)

evt = events.GetTestCaseNamesEvent(event.loader, testCaseClass, isTestMethod)
Expand Down
2 changes: 1 addition & 1 deletion nose2/plugins/loader/testclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def isTestMethod(attrname, cls=cls, excluded=excluded):
prefix = self.session.testMethodPrefix
return (
attrname.startswith(prefix)
and hasattr(getattr(cls, attrname), "__call__")
and attrname not in excluded
and callable(getattr(cls, attrname))
)

evt = GetTestMethodNamesEvent(event.loader, cls, isTestMethod)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# flake8: noqa
import unittest


Expand All @@ -6,7 +7,6 @@ def test_failing_assert(self):
x = True
y = False
# fmt: off
# ruff: noqa
assert x; assert y
# fmt: on

Expand Down

0 comments on commit d7c997d

Please sign in to comment.