-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [Setup.py](setup.py) - Use `with` when opening file to ensure closure ## [Util.py](mako/util.py) - Remove unnecessary else after guard condition - Replace if statement with if expression - Remove unnecessary else after guard condition - Replace unneeded comprehension with generator - Inline variable that is immediately returned ## [Template.py](mako/template.py) - Replace if statement with if expression, Simplify if expression by using or - Replace list(), dict() or set() with comprehension - Swap if/else branches, Merge else clause's nested if statement into elif ## [Runtime.py](mako/runtime.py) - Remove unnecessary else after guard condition ## [PyParser.py](mako/pyparser.py) - Replace yield inside for loop with yield from - Lift code into else after jump in control flow, Merge else clause's nested if statement into elif - Replace if statement with if expression ## [Pygen.py](mako/pygen.py) - Merge nested if conditions - Simplify conditional into return statement (removes comment) - Replace if statement with if expression, Simplify boolean if expression ## [Parsetree.py](mako/parsetree.py) - Replace unneeded comprehension with generator - Merge else clause's nested if statement into elif - Replace unneeded comprehension with generator ## [Lookup.py](mako/lookup.py) - Swap if/else branches, Merge else clause's nested if statement into elif - Swap if/else branches, Remove unnecessary else after guard condition ## [Lexer.py](mako/lexer.py) - Replace if statement with if expression - Merge nested if conditions - Swap if/else branches, Remove unnecessary else after guard condition, Merge else clause's nested if statement into elif - Swap if/else branches, Remove unnecessary else after guard condition ## [Exceptions.py](mako/exceptions.py) - Replace if statement with if expression, Use `with` when opening file to ensure closure ## [Ast.py](mako/ast.py) - Replace multiple comparisons of same variable with `in` operator ## [Pygmentplugin.py](mako/ext/pygmentplugin.py) - Replace if statement with if expression Closes: #335 Pull-request: #335 Pull-request-sha: c6243b1 Change-Id: I9093e2f5ca4bb59aa12536b1a0bdf2d58514aa40
- Loading branch information
Showing
15 changed files
with
187 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,6 @@ jobs: | |
- "windows-latest" | ||
- "macos-latest" | ||
python-version: | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.