Skip to content

Commit 1a85b50

Browse files
committed
v0.3.1
1 parent bdbebe9 commit 1a85b50

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.3.1] - 2024-10-07
6+
7+
- Fixed issue with reading global `maid.json` file.
8+
- Removed some linter warnings.
9+
510
## [0.3.0] - 2024-10-07
611

712
- Breaking: removed support for '.maidignore' files, now use 'maid.json' instead.

maid.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from pathlib import Path
3636
import fnmatch
3737

38-
VERSION = "0.3.0"
38+
VERSION = "0.3.1"
3939

4040
# default blacklist
4141
BLACKLIST = [
@@ -114,7 +114,6 @@ def is_binary(file_path):
114114

115115
def _apply_rules(file_name, content, rules):
116116
import fnmatch
117-
import re
118117
import logging
119118

120119
for rule in rules:
@@ -232,8 +231,6 @@ def scan_directory(directory, markdown_content, global_blacklist, global_rules):
232231
rules = global_rules.copy()
233232
blacklist = global_blacklist.copy()
234233

235-
# load_maid_conf(directory, blacklist, rules)
236-
237234
for root, dirs, files in os.walk(directory):
238235
local_blacklist = blacklist.copy()
239236
local_rules = rules.copy()
@@ -323,7 +320,12 @@ def main():
323320
for path in args.paths:
324321
if os.path.isdir(path):
325322
logging.info(f"Scanning directory: {path}")
326-
scan_directory(path, markdown_content, blacklist, rules)
323+
_blacklist = blacklist.copy()
324+
_rules = rules.copy()
325+
326+
load_maid_conf(path, _blacklist, _rules)
327+
328+
scan_directory(path, markdown_content, _blacklist, _rules)
327329
elif os.path.isfile(path):
328330
if not is_blacklisted(path, blacklist):
329331
logging.info(f"Processing file: {path}")

0 commit comments

Comments
 (0)