gecko-dev/xpcom/ds
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
..
test Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
tools Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
ArenaAllocator.h
ArenaAllocatorExtensions.h
ArrayAlgorithm.h Bug 1665614 - Make mozilla::Result work with non-copyable/non-param error types. r=emilio,jandem 2020-09-21 13:12:48 +00:00
ArrayIterator.h Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj 2020-03-28 16:00:09 +00:00
Atom.py Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
AtomArray.h
Dafsa.cpp Bug 1534878 - xpcom: Make some global functions static. r=erahm 2019-02-24 17:35:59 -08:00
Dafsa.h
HTMLAtoms.py
IncrementalTokenizer.cpp
IncrementalTokenizer.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
MruCache.h
Observer.h Bug 1645339 - Use range-based for with nsTObserverArray in xpcom. r=froydnj 2020-06-15 08:55:27 +00:00
PLDHashTable.cpp Bug 1666746 - pt 2. Reuse SlotForIndex to avoid duplicate code r=froydnj 2020-09-25 00:10:18 +00:00
PLDHashTable.h Bug 1666746 - pt 1. Add an IsAllocated method r=froydnj 2020-09-25 00:09:35 +00:00
PerfectHash.h Bug 1625138 - Part 4: Replace mozilla::MakeUnsigned with std::make_unsigned. r=froydnj 2020-03-28 13:57:12 +00:00
SimpleEnumerator.h
StaticAtoms.py Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
StickyTimeDuration.h
Tokenizer.cpp Bug 1628713 - Add `Tokenizer::CheckPhrase` to quickly check for compound strings, r=xpcom-reviewers,erahm 2020-07-23 12:57:50 +00:00
Tokenizer.h Bug 1628713 - Add `Tokenizer::CheckPhrase` to quickly check for compound strings, r=xpcom-reviewers,erahm 2020-07-23 12:57:50 +00:00
components.conf Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
nsArray.cpp
nsArray.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsArrayEnumerator.cpp
nsArrayEnumerator.h
nsArrayUtils.cpp
nsArrayUtils.h
nsAtom.h Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj 2020-08-07 07:42:50 +00:00
nsAtomTable.cpp Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj 2020-07-01 08:29:29 +00:00
nsAtomTable.h
nsBaseHashtable.h Bug 1627198 - Make nsTHashtable a STL-style range. r=froydnj 2020-04-06 09:18:02 +00:00
nsCOMArray.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
nsCOMArray.h Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
nsCRT.cpp
nsCRT.h Bug 1575495: part 4) Add `AddLineBreak` to `CurrentLineContent`. r=hsivonen 2019-08-23 14:00:50 +00:00
nsCharSeparatedTokenizer.h
nsCheapSets.h Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj 2019-12-20 07:16:43 +00:00
nsClassHashtable.h Bug 1646772 - Add nsClassHashtable::LookupOrAddFromFactory and missing tests for nsClassHashtable::LookupForAdd. r=froydnj 2020-06-22 14:54:18 +00:00
nsDataHashtable.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsDeque.cpp Bug 1337953 - Make nsDeque templated on pointer type r=froydnj 2020-06-25 02:39:23 +00:00
nsDeque.h Bug 1647536 - Support ref counted pointers in nsDeque r=froydnj 2020-08-22 15:47:59 +00:00
nsEnumeratorUtils.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsEnumeratorUtils.h
nsExpirationTracker.h Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj 2020-06-10 10:46:14 +00:00
nsGkAtoms.cpp
nsGkAtoms.h Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-07-06 08:18:28 +00:00
nsHashKeys.h Bug 1641245 - Make string comparators not virtual. r=froydnj,necko-reviewers,geckoview-reviewers,jgilbert,agi,valentin 2020-05-27 18:11:12 +00:00
nsHashPropertyBag.cpp Bug 1627389 - Add missing using statements to xpcom/ds. r=xpcom-reviewers,KrisWright 2020-04-06 22:35:20 +00:00
nsHashPropertyBag.h Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown 2020-02-27 17:39:15 +00:00
nsIArray.idl
nsIArrayExtensions.idl
nsIINIParser.idl
nsIMutableArray.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsINIParserImpl.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsINIParserImpl.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsIObserver.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIObserverService.idl Bug 1612724 - Part 1: Add a NotifyWhenScriptSafe helper method to nsIObserverService, r=froydnj 2020-02-04 22:09:34 +00:00
nsIPersistentProperties.h
nsIPersistentProperties2.idl
nsIProperties.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIProperty.idl
nsIPropertyBag.idl
nsIPropertyBag2.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsISerializable.idl
nsISimpleEnumerator.idl
nsIStringEnumerator.idl
nsISupportsIterators.idl
nsISupportsPrimitives.idl Bug 1545851, part 2 - Mark nsISupportsPrimitive and subinterfaces as builtinclass. r=froydnj 2019-04-22 14:35:18 +00:00
nsIVariant.idl Bug 1550860 - Mark implicit builtinclass interfaces explicitly. r=nika 2019-05-13 19:51:49 +00:00
nsIWindowsRegKey.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIWritablePropertyBag.idl
nsIWritablePropertyBag2.idl
nsInterfaceHashtable.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsJSThingHashtable.h
nsMathUtils.h Bug 1535226 - Remove uses of XP_WIN32 in Gecko. r=glandium 2019-03-21 01:28:50 +00:00
nsObserverList.cpp Bug 1659955 - Replace output parameter by return value in FillObserverArray and rename accordingly. r=froydnj 2020-08-26 07:24:21 +00:00
nsObserverList.h Bug 1659955 - Fix leak counting in nsObserverList. r=froydnj 2020-08-26 07:24:36 +00:00
nsObserverService.cpp Bug 1667915 - Separate marker category from marker options - r=gregtatum 2020-10-01 11:02:23 +00:00
nsObserverService.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsPersistentProperties.cpp Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsPersistentProperties.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsPointerHashKeys.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsProperties.cpp Bug 1551647. Stop using [array] in nsIProperties. r=froydnj 2019-05-14 18:46:13 +00:00
nsProperties.h
nsQuickSort.cpp Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan 2019-05-01 08:47:10 +00:00
nsQuickSort.h
nsRefPtrHashtable.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsSimpleEnumerator.cpp
nsSimpleEnumerator.h
nsStaticAtomUtils.h
nsStaticNameTable.cpp Bug 1591132 - Make it easy to switch on and off these assertions in different build configurations. r=froydnj 2019-10-28 23:27:30 +00:00
nsStaticNameTable.h
nsStringEnumerator.cpp Bug 1122740 - remove useless null checks after allocating memory with |new| r=erahm 2019-06-04 04:43:11 +00:00
nsStringEnumerator.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsSupportsPrimitives.cpp Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin 2020-05-17 06:58:48 +00:00
nsSupportsPrimitives.h Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj 2020-02-12 11:13:33 +00:00
nsTArray-inl.h Bug 1670358 - Don't use realloc for shrinking nsTArrays and similar when RelocationStrategy::allowRealloc is false r=sg 2020-10-21 13:50:36 +00:00
nsTArray.cpp Bug 1243463 - make `sEmptyTArrayHeader` const; r=mccr8 2020-09-01 18:10:27 +00:00
nsTArray.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-09-08 04:32:00 +00:00
nsTArrayForwardDeclare.h Bug 1626570 - Add CopyableTArray. r=xpcom-reviewers,nika 2020-04-30 09:35:57 +00:00
nsTHashtable.h Bug 1599160 - Fix build error with nsTHashtable<const SheetLoadDataHashKey>. r=froydnj 2020-06-02 17:02:51 +00:00
nsTObserverArray.cpp
nsTObserverArray.h Bug 1645386 - Use nsTObserverArray::NonObservingRange where possible instead of ForwardRange. r=froydnj 2020-06-22 08:21:24 +00:00
nsTPriorityQueue.h Bug 1643289 - Move elements where possible in nsTPriorityQueue instead of copying them. r=froydnj 2020-06-10 10:46:34 +00:00
nsVariant.cpp Bug 1651210 - uint variant values should convert over as uints, not ints r=froydnj 2020-07-09 13:02:29 +00:00
nsVariant.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00
nsWhitespaceTokenizer.h
nsWindowsRegKey.cpp Bug 1241518 - Part 1: Remove unused nsAutoPtr.h includes in xpcom/ r=kmag 2020-01-07 00:06:01 +00:00
nsWindowsRegKey.h Bug 1624776 - Replace MOZ_MUST_USE with [[nodiscard]] in xpcom. r=xpcom-reviewers,KrisWright 2020-03-27 17:21:48 +00:00