1. Michał Górny
  2. flaggie

Commits

Michał Górny  committed 0069910

Disable '*' pattern for package.keywords as well.

  • Participants
  • Parent commits 0f41d0a
  • Branches master

Comments (0)

Files changed (2)

File README

View file
  • Ignore whitespace
 `IUSE`, `KEYWORDS` or `LICENSE` variable. With `%` and `?`, it is done
 against values specified in `package.*` files.
 
+Please denote that for keywords, `*` and `**` arguments have special
+meaning and will not be parsed as patterns. If you need to perform
+pattern matching there, please use `?*` instead.
+
 In addition to that, the argument can be preceded by a namespace
 specifier in the form `ns::`, where `ns` can be one of `use`, `kw` or
 `lic` (or a pattern).

File lib/flaggie/action.py

View file
  • Ignore whitespace
 			if not arg:
 				arg = '*'
 
-			# Check whether the argument looks like a pattern
-			# but denote that '**' has special meaning.
-			if arg != '**':
+			# Check whether the argument looks like a pattern but denote that
+			# for keywords '**' and '*' have special meaning.
+			if (ns and 'kw' not in ns) or arg not in ('**', '*'):
 				for schr in ('*', '?', '['):
 					if schr in arg:
 						if not ns: