Browse Source

Fixed templates runner.

master
Иванов Денис 4 months ago
parent
commit
33b7245ebc
3 changed files with 5 additions and 6 deletions
  1. +1
    -1
      calculate/server/server.py
  2. +0
    -1
      calculate/templates/format/base_format.py
  3. +4
    -4
      run_templates.py

+ 1
- 1
calculate/server/server.py View File

@@ -22,7 +22,7 @@ import os


class Server:
def __init__(self, socket_path='./input.sock',
def __init__(self, socket_path: str = './input.sock',
datavars_path: str = 'calculate/vars/',
commands_path: str = 'calculate/commands'):
self._app = FastAPI()


+ 0
- 1
calculate/templates/format/base_format.py View File

@@ -387,7 +387,6 @@ class Format:

template_paths.append(template_path)
header = self._make_header(template_paths)
print(header)
document_text = re.sub(header_pattern, '', input_text)

if check_shebang:


+ 4
- 4
run_templates.py View File

@@ -28,11 +28,11 @@ def main():
io_module = IOModule()

if args.install is None:
package = NonePackage
install = NonePackage
elif args.install.strip().casefold() == 'all':
package = None
install = None
else:
package = args.install
install = args.install

group_packages = {}
if args.build is not None:
@@ -43,7 +43,7 @@ def main():
action = list(flat_iterable(args.action))
template_processor = DirectoryProcessor(action,
datavars_module=datavars,
package=package,
install=install,
output_module=io_module,
dbpkg=args.dbpkg,
**group_packages)


Loading…
Cancel
Save