Skip to content

Commit

Permalink
Quality: For files split with isort ensure newline for second part
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhayen committed Sep 19, 2022
1 parent 1d807af commit e983f55
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions bin/autoformat-nuitka-source
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.quality.auto_format.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/check-nuitka-with-codespell
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.quality.codespell.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/check-nuitka-with-pylint
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.quality.pylint.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/check-nuitka-with-restlint
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.quality.restlint.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/check-nuitka-with-yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.quality.yamllint.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/check-reference-counts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.testing.check_reference_counts.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/compare_with_cpython
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.testing.compare_with_cpython.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/find-module
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.general.find_module.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/find_sxs_modules
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.testing.find_sxs_modules.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/generate-specialized-c-code
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.specialize.SpecializeC import main

main()
1 change: 1 addition & 0 deletions bin/generate-specialized-python-code
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.specialize.SpecializePython import main

main()
1 change: 1 addition & 0 deletions bin/measure-construct-performance
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

from nuitka.tools.testing.measure_construct_performance.__main__ import main

main()
1 change: 1 addition & 0 deletions bin/nuitka
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

import nuitka.__main__ # false alarm, pylint: disable=I0021,no-name-in-module

# Remove the nuitka package directory again, it might contain other stuff that we
Expand Down
1 change: 1 addition & 0 deletions bin/nuitka-run
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

import nuitka.__main__ # false alarm, pylint: disable=I0021,no-name-in-module

# Remove the nuitka package directory again, it might contain other stuff that we
Expand Down
1 change: 1 addition & 0 deletions bin/nuitka3
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

import nuitka.__main__

nuitka.__main__.main()
1 change: 1 addition & 0 deletions bin/nuitka3-run
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import sys
sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))

# isort:start

import nuitka.__main__

nuitka.__main__.main()
2 changes: 1 addition & 1 deletion nuitka/tools/quality/auto_format/AutoFormat.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def _cleanupImportSortOrder(filename):
if start_index is not None:
contents = getFileContents(filename)

contents = "\n".join(parts[: start_index + 1]) + "\n" + contents
contents = "\n".join(parts[: start_index + 1]) + "\n\n" + contents.lstrip("\n")

putTextFileContents(filename, contents=contents)

Expand Down
1 change: 1 addition & 0 deletions nuitka/tools/quality/yamllint/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
)

# isort:start

from optparse import OptionParser

from nuitka.tools.Basics import goHome
Expand Down
1 change: 0 additions & 1 deletion nuitka/tools/specialize/SpecializeC.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

# isort:start


import os

import nuitka.specs.BuiltinBytesOperationSpecs
Expand Down
1 change: 1 addition & 0 deletions tests/onefile/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
)

# isort:start

from nuitka.freezer.RuntimeTracing import getRuntimeTraceOfLoadedFiles
from nuitka.tools.testing.Common import (
addExtendedExtraOptions,
Expand Down
3 changes: 2 additions & 1 deletion tests/optimizations/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
)

# isort:start

from nuitka.tools.testing.Common import (
convertUsing2to3,
createSearchMode,
Expand All @@ -61,7 +62,7 @@
from nuitka.utils.Execution import check_call
from nuitka.utils.FileOperations import getFileContents

python_version = setup(suite="optimiations")
python_version = setup(suite="optimizations")

search_mode = createSearchMode()

Expand Down

0 comments on commit e983f55

Please sign in to comment.