Skip to content

Commit 6d105d1

Browse files
authored
Fix issue with type checking in glob (#211)
* Fix issue with type checking in glob * Update changelog
1 parent 876362e commit 6d105d1

File tree

5 files changed

+37
-4
lines changed

5 files changed

+37
-4
lines changed

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 - 2023 Isaac Muse
3+
Copyright (c) 2018 - 2024 Isaac Muse
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/src/markdown/about/changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 8.5.1
4+
5+
- **FIX**: Fix issue with type check failure in `wcmatch.glob`.
6+
37
## 8.5
48

59
- **NEW**: Formally support Python 3.11 (no change).

mkdocs.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repo_url: https://github.com/facelessuser/wcmatch
44
edit_uri: tree/main/docs/src/markdown
55
site_description: A wildcard file name matching library
66
copyright: |
7-
Copyright &copy; 2014 - 2023 <a href="https://github.com/facelessuser" target="_blank" rel="noopener">Isaac Muse</a>
7+
Copyright &copy; 2014 - 2024 <a href="https://github.com/facelessuser" target="_blank" rel="noopener">Isaac Muse</a>
88
99
docs_dir: docs/src/markdown
1010
theme:
@@ -120,6 +120,35 @@ markdown_extensions:
120120
- example
121121
- quote
122122
- pymdownx.blocks.details:
123+
types:
124+
- name: details-new
125+
class: new
126+
- name: details-settings
127+
class: settings
128+
- name: details-note
129+
class: note
130+
- name: details-abstract
131+
class: abstract
132+
- name: details-info
133+
class: info
134+
- name: details-tip
135+
class: tip
136+
- name: details-success
137+
class: success
138+
- name: details-question
139+
class: question
140+
- name: details-warning
141+
class: warning
142+
- name: details-failure
143+
class: failure
144+
- name: details-danger
145+
class: danger
146+
- name: details-bug
147+
class: bug
148+
- name: details-example
149+
class: example
150+
- name: details-quote
151+
class: quote
123152
- pymdownx.blocks.html:
124153
- pymdownx.blocks.definition:
125154
- pymdownx.blocks.tab:

wcmatch/__meta__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,5 @@ def parse_version(ver: str) -> Version:
194194
return Version(major, minor, micro, release, pre, post, dev)
195195

196196

197-
__version_info__ = Version(8, 5, 0, "final")
197+
__version_info__ = Version(8, 5, 1, "final")
198198
__version__ = __version_info__._get_canonical()

wcmatch/glob.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def __init__(
452452
self.re_no_dir = cast(Pattern[AnyStr], _wcparse.RE_WIN_NO_DIR[ptype])
453453

454454
temp = os.fspath(root_dir) if root_dir is not None else self.current
455-
if not isinstance(temp, type(pats[0])):
455+
if not isinstance(temp, bytes if ptype else str):
456456
raise TypeError(
457457
'Pattern and root_dir should be of the same type, not {} and {}'.format(
458458
type(pats[0]), type(temp)

0 commit comments

Comments
 (0)