Skip to content

Commit

Permalink
chore(format): update rules, split long comment lines (#167)
Browse files Browse the repository at this point in the history
* update rules in pyproject.toml, add import sorting rule 
* split or ignore comment lines where needed for E501
  • Loading branch information
wpbonelli committed Apr 4, 2024
1 parent b8c5588 commit 5a727a1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pymake/pymake_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,8 +1192,7 @@ def _create_win_batch(
# open the batch file
f = open(batchfile, "w")

# only write the compilervars batch command to batchfile if env vars aren't already configured
# https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-windows.html
# only write the command to batchfile if env vars aren't already configured
if os.environ.get("SETVARS_COMPLETED") != "1":
line = "call " + intel_setvars + "\n"
f.write(line)
Expand Down
4 changes: 2 additions & 2 deletions pymake/utils/_usgs_src_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,14 @@ def _update_mfusg_gsi_files(srcdir, fc, cc, arch, double):
"""
tags = {
"FMTARG = 'BINARY'": "FMTARG = 'UNFORMATTED'\n ACCARG = 'STREAM'",
"FMTARG = 'BINARY'": "FMTARG = 'UNFORMATTED'\n ACCARG = 'STREAM'", # noqa: E501
",SHARED,ACCESS='SEQUENTIAL'": ",ACCESS='SEQUENTIAL'",
"FORM=FMTARG,SHARED,": "FORM=FMTARG,",
",BUFFERED='YES',": ",",
", BUFFERED='NO')": ")",
",SHARE = 'DENYNONE'": ",",
", SHARE = 'DENYNONE',": ",",
"FORM='FORMATTED',ACCESS='SEQUENTIAL',": "FORM='FORMATTED',ACCESS='SEQUENTIAL'",
"FORM='FORMATTED',ACCESS='SEQUENTIAL',": "FORM='FORMATTED',ACCESS='SEQUENTIAL'", # noqa: E501
}

fpth = pl.Path(srcdir) / "glo2basu1.f"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ include = [
]

[tool.ruff.lint]
select = ["F", "E", "I001"]
ignore = [
"E402", # module level import not at top of file
"E712", # Avoid equality comparisons to `True`
Expand Down

0 comments on commit 5a727a1

Please sign in to comment.