Merge ~jugmac00/lazr.config:use-inclusive-naming-via-woke into lazr.config:main

Proposed by Jürgen Gmach
Status: Merged
Merged at revision: 61158fbbd053e25c5da58996d6a6af28fe57c461
Proposed branch: ~jugmac00/lazr.config:use-inclusive-naming-via-woke
Merge into: lazr.config:main
Diff against target: 300 lines (+237/-4)
5 files modified
.pre-commit-config.yaml (+4/-0)
CONTRIBUTING.rst (+1/-1)
NEWS.rst (+1/-0)
src/lazr/config/_config.py (+3/-3)
woke.yaml (+228/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+411604@code.launchpad.net

Commit message

Apply inclusive naming via the woke pre-commit hook

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
2index 9837b22..3896c63 100644
3--- a/.pre-commit-config.yaml
4+++ b/.pre-commit-config.yaml
5@@ -16,3 +16,7 @@ repos:
6 rev: 4.0.1
7 hooks:
8 - id: flake8
9+- repo: https://github.com/get-woke/woke
10+ rev: ee781d3ce0ddf835267764f27f4ffdd2dd21fa27
11+ hooks:
12+ - id: woke-from-source
13diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
14index ca9ac67..6751bca 100644
15--- a/CONTRIBUTING.rst
16+++ b/CONTRIBUTING.rst
17@@ -47,4 +47,4 @@ To run this project's tests, use `tox <https://tox.readthedocs.io/en/latest/>`_.
18
19 To update the `project's documentation
20 <https://lazrconfig.readthedocs.io/en/latest/>`_ you need to trigger a manual
21-build on the project's dashboard on https://readthedocs.org.
22\ No newline at end of file
23+build on the project's dashboard on https://readthedocs.org.
24diff --git a/NEWS.rst b/NEWS.rst
25index 4615502..58e26ba 100644
26--- a/NEWS.rst
27+++ b/NEWS.rst
28@@ -6,6 +6,7 @@ NEWS for lazr.config
29 =====
30 - Add basic pre-commit configuration.
31 - Publish Documentation on Read the Docs.
32+- Apply inclusive naming via the woke pre-commit hook.
33
34 2.2.3 (2021-01-26)
35 ==================
36diff --git a/src/lazr/config/_config.py b/src/lazr/config/_config.py
37index 8069d40..4cc16a1 100644
38--- a/src/lazr/config/_config.py
39+++ b/src/lazr/config/_config.py
40@@ -389,7 +389,7 @@ class ConfigSchema:
41 section_schemas = []
42 for key in self._section_schemas:
43 section = self._section_schemas[key]
44- category, dummy = section.category_and_section_names
45+ category, _ = section.category_and_section_names
46 if name == category:
47 section_schemas.append(section)
48 return section_schemas
49@@ -456,7 +456,7 @@ class ConfigData:
50 category_names = set()
51 for section_name in self._sections:
52 section = self._sections[section_name]
53- category, dummy = section.category_and_section_names
54+ category, _ = section.category_and_section_names
55 if category is not None:
56 category_names.add(category)
57 return tuple(category_names)
58@@ -491,7 +491,7 @@ class ConfigData:
59 sections = []
60 for key in self._sections:
61 section = self._sections[key]
62- category, dummy = section.category_and_section_names
63+ category, _ = section.category_and_section_names
64 if name == category:
65 sections.append(section)
66 return sections
67diff --git a/woke.yaml b/woke.yaml
68new file mode 100644
69index 0000000..9d704fa
70--- /dev/null
71+++ b/woke.yaml
72@@ -0,0 +1,228 @@
73+
74+# Based on Canonical's Guidelines
75+# https://docs.google.com/document/d/1mJUa1VJHOMWa723dmKmNjSKGW-nlBv9xktzGZZwacVo/edit#heading=h.5efudb237qdb
76+rules:
77+ - name: whitelist
78+ terms:
79+ - whitelist
80+ - white-list
81+ - whitelisted
82+ - white-listed
83+ alternatives:
84+ - allowlist
85+ - inclusion list
86+ severity: warning
87+ note: "The underlying assumption of the whitelist/blacklist metaphor is that white = good and black = bad. Because colors in and of themselves have no predetermined meaning, any meaning we assign to them is cultural: for example, the color red in many Southeast Asian countries is lucky, and is often associated with events like marriages, whereas the color white carries the same connotations in many European countries. In the case of whitelist/blacklist, the terms originate in the publishing industry – one dominated by the USA and England, two countries which participated in slavery and which grapple with their racist legacies to this day."
88+
89+ - name: blacklist
90+ terms:
91+ - blacklist
92+ - black-list
93+ - blacklisted
94+ - black-listed
95+ alternatives:
96+ - denylist
97+ - blocklist
98+ - exclusion list
99+ severity: warning
100+ note: "The underlying assumption of the whitelist/blacklist metaphor is that white = good and black = bad. Because colors in and of themselves have no predetermined meaning, any meaning we assign to them is cultural: for example, the color red in many Southeast Asian countries is lucky, and is often associated with events like marriages, whereas the color white carries the same connotations in many European countries. In the case of whitelist/blacklist, the terms originate in the publishing industry – one dominated by the USA and England, two countries which participated in slavery and which grapple with their racist legacies to this day."
101+
102+ - name: master-slave
103+ terms:
104+ - master-slave
105+ - master/slave
106+ alternatives:
107+ - leader/follower
108+ - main/replica
109+ - primary/replica
110+ - primary/standby
111+ - primary/secondary
112+
113+ - name: slave
114+ terms:
115+ - slave
116+ alternatives:
117+ - follower
118+ - replica
119+ - standby
120+
121+ - name: grandfathered
122+ terms:
123+ - grandfathered
124+ alternatives:
125+ - legacy status
126+ - legacied
127+ - exempted
128+ - carried
129+ - brought forward
130+ - rolled over
131+
132+ - name: man-hours
133+ terms:
134+ - man hours
135+ - man-hours
136+ alternatives:
137+ - person hours
138+ - engineer hours
139+
140+ - name: sanity
141+ terms:
142+ - sanity
143+ alternatives:
144+ - confidence
145+ - quick check
146+ - coherence check
147+
148+ - name: dummy
149+ terms:
150+ - dummy
151+ alternatives:
152+ - placeholder
153+ - sample
154+
155+ - name: guys
156+ terms:
157+ - guys
158+ alternatives:
159+ - folks
160+ - people
161+ - you all
162+ - y'all
163+ - yinz
164+
165+ - name: whitebox
166+ terms:
167+ - white-box
168+ - whitebox
169+ - white box
170+ alternatives:
171+ - open-box
172+
173+ - name: blackbox
174+ terms:
175+ - black-box
176+ - blackbox
177+ - black box
178+ alternatives:
179+ - closed-box
180+
181+ - name: blackhat
182+ terms:
183+ - blackhat
184+ - black-hat
185+ - black hat
186+ alternatives:
187+ - attacker
188+ - malicious actor
189+
190+ - name: whitehat
191+ terms:
192+ - whitehat
193+ - white-hat
194+ - white hat
195+ alternatives:
196+ - researcher
197+ - security specialist
198+
199+ - name: illegal characters
200+ terms:
201+ - illegal characters
202+ alternatives:
203+ - invalid characters
204+ - unsupported characters
205+ - special characters
206+
207+ - name: native feature
208+ terms:
209+ - native feature
210+ alternatives:
211+ - core feature
212+ - built-in feature
213+
214+ - name: native feature
215+ terms:
216+ - native feature
217+ alternatives:
218+ - core feature
219+ - built-in feature
220+
221+ - name: chairman/foreman
222+ terms:
223+ - chairman
224+ - foreman
225+ alternatives:
226+ - chair
227+ - foreperson
228+
229+ - name: man in the middle
230+ terms:
231+ - man in the middle
232+ - man-in-the-middle
233+ alternatives:
234+ - machine-in-the-middle
235+ - person-in-the-middle
236+ - system-in-the-middle
237+ - intermediary attack
238+
239+ - name: middleman
240+ terms:
241+ - middleman
242+ alternatives:
243+ - middleperson
244+ - intermediary
245+
246+ - name: manned
247+ terms:
248+ - manned
249+ alternatives:
250+ - crewed
251+ - staffed
252+ - monitored
253+ - human operated
254+
255+ - name: mom test / girlfriend test
256+ terms:
257+ - mom test
258+ - girlfriend test
259+ alternatives:
260+ - user test
261+ - user friendly
262+
263+ - name: crazy
264+ terms:
265+ - crazy
266+ alternatives:
267+ - baffling
268+ - unexplained
269+ - errant
270+
271+ - name: cripples
272+ terms:
273+ - cripples
274+ alternatives:
275+ - slows down
276+ - hinders
277+ - obstructs
278+
279+ - name: crippling
280+ terms:
281+ - crippling
282+ alternatives:
283+ - attenuating
284+ - incapacitating
285+
286+ - name: stonith/stomith
287+ terms:
288+ - stonith
289+ - stomith
290+ alternatives:
291+ - fence failed nodes
292+ - machines
293+
294+ - name: demilitarized zone
295+ terms:
296+ - demilitarized zone
297+ - dmz
298+ alternatives:
299+ - perimeter network
300+ - passthrough network

Subscribers

People subscribed via source and target branches