From 88a6a208d94e90d7eb2db3d14443faa137647359 Mon Sep 17 00:00:00 2001 From: oleting Date: Sun, 17 Jan 2021 12:12:18 +0000 Subject: [PATCH] test --- interpreter/NassiShneidermann.py | 4 ++-- interpreter/interpret_source.py | 2 +- web_app/main/forms.py | 6 +++--- web_app/templates/layout.html | 10 +++++----- web_app/templates/upload.html | 28 ++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 11 deletions(-) diff --git a/interpreter/NassiShneidermann.py b/interpreter/NassiShneidermann.py index 2bfa914..fe91cca 100644 --- a/interpreter/NassiShneidermann.py +++ b/interpreter/NassiShneidermann.py @@ -1,7 +1,7 @@ from os import stat from interpreter.interpret_source import Function_scope from typing import Dict, List, Optional -from PySimpleGUI import one_line_progress_meter +# from PySimpleGUI import one_line_progress_meter import logging from enum import IntEnum import os.path @@ -29,7 +29,7 @@ class NassiShneidermanDiagram: logLevel = logging.INFO if debug: logLevel = logging.DEBUG - + logging.basicConfig(force=True, level=logLevel) @staticmethod diff --git a/interpreter/interpret_source.py b/interpreter/interpret_source.py index 35d25fb..79335cb 100644 --- a/interpreter/interpret_source.py +++ b/interpreter/interpret_source.py @@ -289,7 +289,7 @@ class JavaInterpreter: brace_offset = self._get_scope_start_offset(idx) return self._get_instructions_in_scope(idx+brace_offset)[0] - def _get_function_scope(self, match: re.Match[str]): + def _get_function_scope(self, match: Match[str]): span = match.span() header = self.src[span[0]:span[1]].replace('\n', '') diff --git a/web_app/main/forms.py b/web_app/main/forms.py index fb64dfc..fb4db9b 100644 --- a/web_app/main/forms.py +++ b/web_app/main/forms.py @@ -5,8 +5,8 @@ from flask_wtf.file import FileAllowed from wtforms.fields.core import StringField class UploadJavaForm(FlaskForm): - comments = StringField('Enter customn comments (//, #, ...): ', validators=(Optional())) - types = StringField('custom types (//, #, ...)', validators=(Optional())) - remove_tags = StringField('Enter customn modifier (public, private, ...): ', validators=(Optional())) + comments = StringField('Enter customn comments (//, #, ...): ', validators=([Optional(),])) + types = StringField('custom types (//, #, ...)', validators=([Optional(),])) + remove_tags = StringField('Enter customn modifier (public, private, ...): ', validators=([Optional(),])) java = FileField('.java hochladen', validators=[FileAllowed(['java', 'txt'])]) submit = SubmitField('Bestätigen') \ No newline at end of file diff --git a/web_app/templates/layout.html b/web_app/templates/layout.html index 9b7ce28..0df53bd 100644 --- a/web_app/templates/layout.html +++ b/web_app/templates/layout.html @@ -4,7 +4,7 @@ - + @@ -15,7 +15,7 @@ {% else %} NassiShneiderman Generator {% endif %} - +