| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
The `black` formatter did most line wrapping for us, and we accept
its default of 88 characters there, but for comments and docstrings
(which black doesn't wrap) we allow up to 99 characters.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Black" is an "opinionated" python formatter, whose opinionatedness
is somewhat in the spirit of rustfmt.
This MR runs black with default settings on all of our python code
in Arti. It was produced by the following commands
```
# Everything in python/
black python/
# Everything with a .py extension
fd '.py$' -X black
# Everything with a python shebang.
git grep -l '#! */usr/bin/env *python' | xargs black
```
|
| | |
|
| |
|
|
|
| |
The module is correctly documented as "only available on crate feature
restricted-discovery" without it.
|
| |
|
|
|
| |
The script isn't handling the `cfg_attr` on `pub mod restricted_discovery`
very well, so we need to use the `additional_required` escape hatch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the script work on `cfg_attr`s applied to `mod` declarations
ending in `;`.
Without this change, the script fails with
```
processing tor-hsservice
res += fn(os.path.join(dir_, file))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builds/nickm/arti/./maint/check_doc_features", line 112, in extract_cfg_attr
end = min(subline.find(pat) for pat in ' (<' if subline.find(pat) !=-1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: min() arg is an empty sequence
```
when run on code with `cfg_attr`s applied to `mod` declarations.
Note: this change just improves the UX a bit, but doesn't actually fix
the issue: the script still isn't able to handle `cfg_attr`'d `mod`s: it
assumes all `#[cfg_attr(docsrs, ..)]` statements are applied to
feature-gated `pub use`s, and if there aren't any (such as in the case
of `cfg_attr`d modules, it assumes the feature gating is missing.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The build found a stale private doc comment as well as an exception
that needed to be made in check_doc_features.
The check_doc_features change solidifies a decision that things marked
with cfg(fuzzing) aren't part of the documented API.
|
| |
|
|
|
|
|
| |
This is failing in CI. I have no idea what the rules are and AFAICT
no-one is alleging that there is an actual bug in the attributes.
Empirically this suppression causes the script to pass.
|
| |
|
|
|
|
|
| |
Clippy nightly doesn't like `#[cfg(all(...))]` with only a single
expression inside the `all(...)`.
This requires an adjustment in check_doc_features.
|
| |
|
|
|
|
| |
In Python, str.find returns -1 if it doesn't find the target
character, and -1 is a true value. So `if pos := foo.find('c')`
won't do what we want.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
This commit changes the shebang in all shell scripts from absolute
paths (such as `/bin/bash` or `/usr/bin/python3`) to the `/usr/bin/env`
binary with the accompanying interpreter as it's argument.
The reason for this are as follows:
- NixOS cannot work with absolute paths
- BSD systems install their packages in /usr/local/bin
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
add checks for many feature combinations
Closes #303
See merge request tpo/core/arti!775
|
| | | |
|
| |/ |
|
| |
|
|
|
|
| |
It has its own error type PtTargetInvalidSetting.
In check_doc_features, adjust suppression to new code.
|
| | |
|
| |
|
|
|
| |
This clarifies that the types apply to pluggable transports only,
and not (typically) to the default plain-old-TCP transport.
|
| |
|
|
|
| |
I've tried to name and structure these for consistency, and
comment reasonably well. We'll still probably want to make changes.
|
| | |
|
| |
|