diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 4b852abd7c6..00000000000 --- a/.flake8 +++ /dev/null @@ -1,37 +0,0 @@ -[flake8] -ignore = - E121, - E126, - E127, - E128, - E203, - E225, - E226, - E231, - E241, - E251, - E261, - E265, - E302, - E303, - E305, - E402, - E501, - E741, - W291, - W292, - W293, - W391, - W503, - W504, - F403, - B007, - B950, - W191, - E124, # closing bracket, irritating while writing QB code - E131, # continuation line unaligned for hanging indent - E123, # closing bracket does not match indentation of opening bracket's line - E101, # ensured by use of black - -max-line-length = 200 -exclude=.github/helper/semgrep_rules diff --git a/.github/helper/.flake8_strict b/.github/helper/.flake8_strict deleted file mode 100644 index 3e8f7dd11ab..00000000000 --- a/.github/helper/.flake8_strict +++ /dev/null @@ -1,74 +0,0 @@ -[flake8] -ignore = - B007, - B009, - B010, - B950, - E101, - E111, - E114, - E116, - E117, - E121, - E122, - E123, - E124, - E125, - E126, - E127, - E128, - E131, - E201, - E202, - E203, - E211, - E221, - E222, - E223, - E224, - E225, - E226, - E228, - E231, - E241, - E242, - E251, - E261, - E262, - E265, - E266, - E271, - E272, - E273, - E274, - E301, - E302, - E303, - E305, - E306, - E402, - E501, - E502, - E701, - E702, - E703, - E741, - F403, - W191, - W291, - W292, - W293, - W391, - W503, - W504, - E711, - E129, - F841, - E713, - E712, - B023, - B028 - - -max-line-length = 200 -exclude=.github/helper/semgrep_rules,test_*.py diff --git a/.github/helper/translation.py b/.github/helper/translation.py deleted file mode 100644 index 2918f784341..00000000000 --- a/.github/helper/translation.py +++ /dev/null @@ -1,68 +0,0 @@ -import re -import sys - -errors_encounter = 0 -pattern = re.compile( - r"_\(([\"']{,3})(?P((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P((?!\5).)*)\5)*(\s*,(\s*?.*?\n*?)*(,\s*([\"'])(?P((?!\11).)*)\11)*)*\)" -) -words_pattern = re.compile(r"_{1,2}\([\"'`]{1,3}.*?[a-zA-Z]") -start_pattern = re.compile(r"_{1,2}\([f\"'`]{1,3}") -f_string_pattern = re.compile(r"_\(f[\"']") -starts_with_f_pattern = re.compile(r"_\(f") - -# skip first argument -files = sys.argv[1:] -files_to_scan = [_file for _file in files if _file.endswith((".py", ".js"))] - -for _file in files_to_scan: - with open(_file) as f: - print(f"Checking: {_file}") - file_lines = f.readlines() - for line_number, line in enumerate(file_lines, 1): - if "frappe-lint: disable-translate" in line: - continue - - start_matches = start_pattern.search(line) - if start_matches: - starts_with_f = starts_with_f_pattern.search(line) - - if starts_with_f: - has_f_string = f_string_pattern.search(line) - if has_f_string: - errors_encounter += 1 - print( - f"\nF-strings are not supported for translations at line number {line_number}\n{line.strip()[:100]}" - ) - continue - else: - continue - - match = pattern.search(line) - error_found = False - - if not match and line.endswith((",\n", "[\n")): - # concat remaining text to validate multiline pattern - line = "".join(file_lines[line_number - 1 :]) - line = line[start_matches.start() + 1 :] - match = pattern.match(line) - - if not match: - error_found = True - print(f"\nTranslation syntax error at line number {line_number}\n{line.strip()[:100]}") - - if not error_found and not words_pattern.search(line): - error_found = True - print( - f"\nTranslation is useless because it has no words at line number {line_number}\n{line.strip()[:100]}" - ) - - if error_found: - errors_encounter += 1 - -if errors_encounter > 0: - print( - '\nVisit "https://frappeframework.com/docs/user/en/translations" to learn about valid translation strings.' - ) - sys.exit(1) -else: - print("\nGood To Go!") diff --git a/.github/try-on-f-cloud-button.svg b/.github/try-on-f-cloud-button.svg deleted file mode 100644 index 270092722e5..00000000000 --- a/.github/try-on-f-cloud-button.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sider.yml b/sider.yml deleted file mode 100644 index 2ca6e8deb15..00000000000 --- a/sider.yml +++ /dev/null @@ -1,3 +0,0 @@ -linter: - flake8: - config: .flake8 \ No newline at end of file