Skip to content

Commit

Permalink
fix: Ruff rule EXE001 (shebang-not-executable)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartsanchez committed Nov 20, 2024
1 parent f51b61a commit 2103037
Show file tree
Hide file tree
Showing 109 changed files with 2 additions and 232 deletions.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ target-version = "py310"
select = [
"C4",
"E",
"EXE",
"F",
"I",
"PLR",
Expand All @@ -120,6 +121,7 @@ ignore = [
"E722",
"E731",
"E741",
"EXE002",
"PLR0124",
"PLR0911",
"PLR0912",
Expand Down
2 changes: 0 additions & 2 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

import sys

PYTHON_VERSION = 3, 10 # Minimum python version required
Expand Down
1 change: 0 additions & 1 deletion src/api/check.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim:ts=4:sw=4:et:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/api/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim:ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/api/constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/api/debug.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim:ts=4:sw=4:et:

# Simple debugging module
Expand Down
2 changes: 0 additions & 2 deletions src/api/decorator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from collections.abc import Callable


Expand Down
1 change: 0 additions & 1 deletion src/api/errmsg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/api/exception.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim:ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/api/global_.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim:ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/api/opcodestemps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

# ----------------------------------------------------------------------
# Copyleft (K), Jose M. Rodriguez-Rosa (a.k.a. Boriel)
#
Expand Down
1 change: 0 additions & 1 deletion src/api/optimize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
import symtable
from collections.abc import Generator
from typing import Any, NamedTuple
Expand Down
1 change: 0 additions & 1 deletion src/api/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:sw=4:et:

# ----------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/api/string_labels.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# ----------------------------------------------------------------------
# Copyleft (K), Jose M. Rodriguez-Rosa (a.k.a. Boriel)
#
Expand Down
1 change: 0 additions & 1 deletion src/api/symboltable/scope.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/api/symboltable/symboltable.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/api/utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

import errno
import os
import shelve
Expand Down
2 changes: 0 additions & 2 deletions src/arch/z80/backend/_16bit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

# --------------------------------------------------------------
# Copyleft (k) 2008, by Jose M. Rodriguez-Rosa
# (a.k.a. Boriel, http://www.boriel.com)
Expand Down
2 changes: 0 additions & 2 deletions src/arch/z80/backend/_32bit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

# --------------------------------------------------------------
# Copyleft (k) 2008, by Jose M. Rodriguez-Rosa
# (a.k.a. Boriel, http://www.boriel.com)
Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/_8bit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:sw=4:et

# --------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/arch/z80/backend/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from src.arch.z80.optimizer.helpers import HI16, LO16
from src.arch.z80.peephole import engine

Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/_array.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim:ts=4:et:sw=4:

# --------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/arch/z80/backend/_f16.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

# --------------------------------------------------------------
# Copyleft (k) 2008, by Jose M. Rodriguez-Rosa
# (a.k.a. Boriel, http://www.boriel.com)
Expand Down
2 changes: 0 additions & 2 deletions src/arch/z80/backend/_float.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

# --------------------------------------------------------------
# Copyleft (k) 2008, by Jose M. Rodriguez-Rosa
# (a.k.a. Boriel, http://www.boriel.com)
Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/_parray.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim:ts=4:et:sw=4:

# --------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/_pload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: et:ts=4:sw=4

# --------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/_str.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim:ts=4:et:sw=4:

# --------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/common.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim ts=4:et:sw=4:ai

import math
Expand Down
1 change: 0 additions & 1 deletion src/arch/z80/backend/exception.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim:ts=4:et:sw=4:

from src.api.exception import Error
Expand Down
7 changes: 0 additions & 7 deletions src/arch/z80/peephole/engine.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/env python3

import os
import sys
from collections.abc import Iterable
from typing import NamedTuple

Expand Down Expand Up @@ -161,7 +158,3 @@ def main(list_of_directories: list[str] | None = None, force: bool = False):

for directory in list_of_directories or [OPTS_PATH]:
read_opts(directory, PATTERNS)


if __name__ == "__main__":
main(sys.argv[1:])
6 changes: 0 additions & 6 deletions src/arch/z80/peephole/parser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env python3
import re
import sys
from collections import defaultdict
from types import MappingProxyType
from typing import Any, Final, NamedTuple
Expand Down Expand Up @@ -337,7 +335,3 @@ def parse_file(fname: str):

global_.FILENAME = tmp # restores original filename
return result


if __name__ == "__main__":
print(parse_file(sys.argv[1]))
2 changes: 0 additions & 2 deletions src/arch/z80/visitor/translator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from collections import namedtuple

import src.api.errmsg
Expand Down
2 changes: 0 additions & 2 deletions src/ast/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from .ast import Ast, NodeVisitor, types
from .tree import Tree

Expand Down
1 change: 0 additions & 1 deletion src/ast/ast.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/ast/tree.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
from __future__ import annotations

import collections.abc
Expand Down
2 changes: 0 additions & 2 deletions src/outfmt/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

from .binary import BinaryEmitter
from .codeemitter import CodeEmitter
from .sna import SnaEmitter
Expand Down
2 changes: 0 additions & 2 deletions src/outfmt/binary.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

# --------------------------------------------
# KopyLeft (K) 2008
# by Jose M. Rodriguez de la Rosa
Expand Down
2 changes: 0 additions & 2 deletions src/outfmt/codeemitter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

# --------------------------------------------
# KopyLeft (K) 2008
# by Jose M. Rodriguez de la Rosa
Expand Down
2 changes: 0 additions & 2 deletions src/outfmt/gensnapshot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

# 48K Snapshot generation module
#
# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors.
Expand Down
2 changes: 0 additions & 2 deletions src/outfmt/sna.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

# 48K .SNA format output module
#
# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors.
Expand Down
2 changes: 0 additions & 2 deletions src/outfmt/z80.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python3

# 48K .Z80 format output module
#
# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors.
Expand Down
1 change: 0 additions & 1 deletion src/parsetab/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
#!/usr/bin/env python
2 changes: 0 additions & 2 deletions src/symbols/arglist.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

# ----------------------------------------------------------------------
# Copyleft (K), Jose M. Rodriguez-Rosa (a.k.a. Boriel)
#
Expand Down
1 change: 0 additions & 1 deletion src/symbols/argument.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/arrayaccess.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:
from functools import cached_property
from typing import Optional
Expand Down
1 change: 0 additions & 1 deletion src/symbols/arraydecl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/arrayload.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/asm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/binary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/block.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/bound.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/boundlist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions src/symbols/builtin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env python

# ----------------------------------------------------------------------
# Copyleft (K), Jose M. Rodriguez-Rosa (a.k.a. Boriel)
#
Expand Down
1 change: 0 additions & 1 deletion src/symbols/call.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/constexpr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/funccall.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/funcdecl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/id_/_id.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/nop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/number.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/paramlist.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/sentence.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/string_.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/strslice.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/sym.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/symbol_.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/type_.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/typecast.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/unary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/symbols/vardecl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python
# vim: ts=4:et:sw=4:

# ----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 2103037

Please sign in to comment.