9273:5c6a9210d291 | 9274:86fab0c74430 |
---|---|
1162 | 1162 |
1163 It tries to detect docstrings as string of the first expression of each | 1163 It tries to detect docstrings as string of the first expression of each |
1164 module, class or function. | 1164 module, class or function. |
1165 """ | 1165 """ |
1166 | 1166 |
1167 # modelled after the string format flake8 extension | 1167 # modeled after the string format flake8 extension |
1168 | 1168 |
1169 def __init__(self): | 1169 def __init__(self): |
1170 """ | 1170 """ |
1171 Constructor | 1171 Constructor |
1172 """ | 1172 """ |
1495 | 1495 |
1496 # | 1496 # |
1497 # This class was implemented along the BugBear flake8 extension (v 19.3.0). | 1497 # This class was implemented along the BugBear flake8 extension (v 19.3.0). |
1498 # Original: Copyright (c) 2016 Łukasz Langa | 1498 # Original: Copyright (c) 2016 Łukasz Langa |
1499 # | 1499 # |
1500 # TODO: update to v22.7.1 | |
1500 | 1501 |
1501 NodeWindowSize = 4 | 1502 NodeWindowSize = 4 |
1502 | 1503 |
1503 def __init__(self): | 1504 def __init__(self): |
1504 """ | 1505 """ |
2138 | 2139 |
2139 class DateTimeVisitor(ast.NodeVisitor): | 2140 class DateTimeVisitor(ast.NodeVisitor): |
2140 """ | 2141 """ |
2141 Class implementing a node visitor to check datetime function calls. | 2142 Class implementing a node visitor to check datetime function calls. |
2142 | 2143 |
2143 Note: This class is modelled after flake8_datetimez checker. | 2144 Note: This class is modeled after flake8_datetimez checker. |
2144 """ | 2145 """ |
2145 | 2146 |
2146 def __init__(self): | 2147 def __init__(self): |
2147 """ | 2148 """ |
2148 Constructor | 2149 Constructor |
2341 class SysVersionVisitor(ast.NodeVisitor): | 2342 class SysVersionVisitor(ast.NodeVisitor): |
2342 """ | 2343 """ |
2343 Class implementing a node visitor to check the use of sys.version and | 2344 Class implementing a node visitor to check the use of sys.version and |
2344 sys.version_info. | 2345 sys.version_info. |
2345 | 2346 |
2346 Note: This class is modelled after flake8-2020 checker. | 2347 Note: This class is modeled after flake8-2020 checker. |
2347 """ | 2348 """ |
2348 | 2349 |
2349 def __init__(self): | 2350 def __init__(self): |
2350 """ | 2351 """ |
2351 Constructor | 2352 Constructor |