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
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9837b22..3896c63 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,3 +16,7 @@ repos:
16 rev: 4.0.116 rev: 4.0.1
17 hooks:17 hooks:
18 - id: flake818 - id: flake8
19- repo: https://github.com/get-woke/woke
20 rev: ee781d3ce0ddf835267764f27f4ffdd2dd21fa27
21 hooks:
22 - id: woke-from-source
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index ca9ac67..6751bca 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -47,4 +47,4 @@ To run this project's tests, use `tox <https://tox.readthedocs.io/en/latest/>`_.
4747
48To update the `project's documentation48To update the `project's documentation
49<https://lazrconfig.readthedocs.io/en/latest/>`_ you need to trigger a manual49<https://lazrconfig.readthedocs.io/en/latest/>`_ you need to trigger a manual
50build on the project's dashboard on https://readthedocs.org.
51\ No newline at end of file50\ No newline at end of file
51build on the project's dashboard on https://readthedocs.org.
diff --git a/NEWS.rst b/NEWS.rst
index 4615502..58e26ba 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -6,6 +6,7 @@ NEWS for lazr.config
6=====6=====
7- Add basic pre-commit configuration.7- Add basic pre-commit configuration.
8- Publish Documentation on Read the Docs.8- Publish Documentation on Read the Docs.
9- Apply inclusive naming via the woke pre-commit hook.
910
102.2.3 (2021-01-26)112.2.3 (2021-01-26)
11==================12==================
diff --git a/src/lazr/config/_config.py b/src/lazr/config/_config.py
index 8069d40..4cc16a1 100644
--- a/src/lazr/config/_config.py
+++ b/src/lazr/config/_config.py
@@ -389,7 +389,7 @@ class ConfigSchema:
389 section_schemas = []389 section_schemas = []
390 for key in self._section_schemas:390 for key in self._section_schemas:
391 section = self._section_schemas[key]391 section = self._section_schemas[key]
392 category, dummy = section.category_and_section_names392 category, _ = section.category_and_section_names
393 if name == category:393 if name == category:
394 section_schemas.append(section)394 section_schemas.append(section)
395 return section_schemas395 return section_schemas
@@ -456,7 +456,7 @@ class ConfigData:
456 category_names = set()456 category_names = set()
457 for section_name in self._sections:457 for section_name in self._sections:
458 section = self._sections[section_name]458 section = self._sections[section_name]
459 category, dummy = section.category_and_section_names459 category, _ = section.category_and_section_names
460 if category is not None:460 if category is not None:
461 category_names.add(category)461 category_names.add(category)
462 return tuple(category_names)462 return tuple(category_names)
@@ -491,7 +491,7 @@ class ConfigData:
491 sections = []491 sections = []
492 for key in self._sections:492 for key in self._sections:
493 section = self._sections[key]493 section = self._sections[key]
494 category, dummy = section.category_and_section_names494 category, _ = section.category_and_section_names
495 if name == category:495 if name == category:
496 sections.append(section)496 sections.append(section)
497 return sections497 return sections
diff --git a/woke.yaml b/woke.yaml
498new file mode 100644498new file mode 100644
index 0000000..9d704fa
--- /dev/null
+++ b/woke.yaml
@@ -0,0 +1,228 @@
1
2# Based on Canonical's Guidelines
3# https://docs.google.com/document/d/1mJUa1VJHOMWa723dmKmNjSKGW-nlBv9xktzGZZwacVo/edit#heading=h.5efudb237qdb
4rules:
5 - name: whitelist
6 terms:
7 - whitelist
8 - white-list
9 - whitelisted
10 - white-listed
11 alternatives:
12 - allowlist
13 - inclusion list
14 severity: warning
15 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."
16
17 - name: blacklist
18 terms:
19 - blacklist
20 - black-list
21 - blacklisted
22 - black-listed
23 alternatives:
24 - denylist
25 - blocklist
26 - exclusion list
27 severity: warning
28 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."
29
30 - name: master-slave
31 terms:
32 - master-slave
33 - master/slave
34 alternatives:
35 - leader/follower
36 - main/replica
37 - primary/replica
38 - primary/standby
39 - primary/secondary
40
41 - name: slave
42 terms:
43 - slave
44 alternatives:
45 - follower
46 - replica
47 - standby
48
49 - name: grandfathered
50 terms:
51 - grandfathered
52 alternatives:
53 - legacy status
54 - legacied
55 - exempted
56 - carried
57 - brought forward
58 - rolled over
59
60 - name: man-hours
61 terms:
62 - man hours
63 - man-hours
64 alternatives:
65 - person hours
66 - engineer hours
67
68 - name: sanity
69 terms:
70 - sanity
71 alternatives:
72 - confidence
73 - quick check
74 - coherence check
75
76 - name: dummy
77 terms:
78 - dummy
79 alternatives:
80 - placeholder
81 - sample
82
83 - name: guys
84 terms:
85 - guys
86 alternatives:
87 - folks
88 - people
89 - you all
90 - y'all
91 - yinz
92
93 - name: whitebox
94 terms:
95 - white-box
96 - whitebox
97 - white box
98 alternatives:
99 - open-box
100
101 - name: blackbox
102 terms:
103 - black-box
104 - blackbox
105 - black box
106 alternatives:
107 - closed-box
108
109 - name: blackhat
110 terms:
111 - blackhat
112 - black-hat
113 - black hat
114 alternatives:
115 - attacker
116 - malicious actor
117
118 - name: whitehat
119 terms:
120 - whitehat
121 - white-hat
122 - white hat
123 alternatives:
124 - researcher
125 - security specialist
126
127 - name: illegal characters
128 terms:
129 - illegal characters
130 alternatives:
131 - invalid characters
132 - unsupported characters
133 - special characters
134
135 - name: native feature
136 terms:
137 - native feature
138 alternatives:
139 - core feature
140 - built-in feature
141
142 - name: native feature
143 terms:
144 - native feature
145 alternatives:
146 - core feature
147 - built-in feature
148
149 - name: chairman/foreman
150 terms:
151 - chairman
152 - foreman
153 alternatives:
154 - chair
155 - foreperson
156
157 - name: man in the middle
158 terms:
159 - man in the middle
160 - man-in-the-middle
161 alternatives:
162 - machine-in-the-middle
163 - person-in-the-middle
164 - system-in-the-middle
165 - intermediary attack
166
167 - name: middleman
168 terms:
169 - middleman
170 alternatives:
171 - middleperson
172 - intermediary
173
174 - name: manned
175 terms:
176 - manned
177 alternatives:
178 - crewed
179 - staffed
180 - monitored
181 - human operated
182
183 - name: mom test / girlfriend test
184 terms:
185 - mom test
186 - girlfriend test
187 alternatives:
188 - user test
189 - user friendly
190
191 - name: crazy
192 terms:
193 - crazy
194 alternatives:
195 - baffling
196 - unexplained
197 - errant
198
199 - name: cripples
200 terms:
201 - cripples
202 alternatives:
203 - slows down
204 - hinders
205 - obstructs
206
207 - name: crippling
208 terms:
209 - crippling
210 alternatives:
211 - attenuating
212 - incapacitating
213
214 - name: stonith/stomith
215 terms:
216 - stonith
217 - stomith
218 alternatives:
219 - fence failed nodes
220 - machines
221
222 - name: demilitarized zone
223 terms:
224 - demilitarized zone
225 - dmz
226 alternatives:
227 - perimeter network
228 - passthrough network

Subscribers

People subscribed via source and target branches