Athanasius
22932a33cc
Merge pull request #651 from A-UNDERSCORE-D/fix/request-hangs-threads
...
Fix request hangs threads on exit
2020-07-31 15:08:21 +01:00
A_D
faac29fe84
Made sure to return super().send()
2020-07-31 15:53:20 +02:00
A_D
81dfbdfb8e
Added timeout_session, made inara use it
...
timeout_session provides two things, TimeoutAdapter, a HTTP adapter
subclass that automatically adds timeouts to all requests, and
new_session, which automatically creates a request.Session with the
adapter in the correct place.
2020-07-31 15:53:20 +02:00
Athanasius
5c7744c595
Merge pull request #650 from EDCD/enhancement/logging-found-plugins
...
Ensure all plugins have correct logging from core code
2020-07-31 14:50:55 +01:00
Athanasius
5eb11d3612
Merge pull request #648 from A-UNDERSCORE-D/cleanup/inara
...
Cleanup inara.py
2020-07-31 14:50:11 +01:00
A_D
21a285e6e9
added some more type hints
2020-07-31 15:47:28 +02:00
A_D
f8d4731472
fixed incorrect indexing
2020-07-31 15:47:27 +02:00
A_D
eba318430a
Removed todos about unused args
2020-07-31 15:47:27 +02:00
A_D
446c812485
replaced oneline logic with multiline
2020-07-31 15:47:26 +02:00
A_D
67a260c07f
added type hints to literals
2020-07-31 15:47:26 +02:00
A_D
9005798862
fixed incorrect comment
2020-07-31 15:47:25 +02:00
A_D
bb1def48cd
replaced list comp with filter
2020-07-31 15:47:25 +02:00
A_D
a699ab062d
fixed station link logic
2020-07-31 15:47:24 +02:00
A_D
e74c5c8ceb
replaced list comp with filter
2020-07-31 15:47:23 +02:00
A_D
820b29f7dd
replace dict(list-comp) with dict comp
2020-07-31 15:47:23 +02:00
A_D
539580e38d
Consistently formatted multi-line add_event calls
2020-07-31 15:47:22 +02:00
A_D
96279cb0af
Replaced repeated entry['event'] with variable
2020-07-31 15:47:21 +02:00
A_D
71ad0f92ac
removed outdated comment
2020-07-31 15:47:21 +02:00
A_D
8e49066ca4
Replaced convoluted or-based logic with terneries
2020-07-31 15:47:20 +02:00
A_D
9db9ed4dfc
Cleaned up overlong lines
2020-07-31 15:47:19 +02:00
A_D
13c2679c38
Added spacing around scope changes
2020-07-31 15:47:19 +02:00
A_D
160013e3e5
Added type annotations and docstrings
2020-07-31 15:47:18 +02:00
A_D
eec4c2ebd6
autoformat with autopep8
2020-07-31 15:47:18 +02:00
Athanasius
3a31139cbd
Correct frame_info type
2020-07-31 14:46:38 +01:00
Athanasius
efe63ceac9
Refactor caller_attributes() code into separate methods
...
* find_caller_frame() to do the frame walk.
* munge_module_name() to fix up for plugins.
NB: caller_attributes() now has a noqa on CCR001 as I don't think it
can sensibly be made any less complex. Pulling out the 'if frame:'
section just results in *that* new method then being labelled as too
complex.:244
2020-07-31 14:46:38 +01:00
Athanasius
282e3ddbc5
Fix up and expand on docstrings.
2020-07-31 14:46:38 +01:00
Athanasius
657253b3e3
Set internal and found plugin module_name separately.
...
* Settled on `plugins.internal` and `<plugins>.found` as the format.
* A PyCharm recommendation was to use 'cls' instead of 'self' on class
methods, so the class detection code needs to cater for that.
Technically a developer could use any string for the "myself" member
name, but we'll assume just these two.
* Found will always have at least one folder level within plugin_dir
* Internal should always have *no* folder within internal_plugin_dir,
but cater for it just in case in future.
2020-07-31 14:46:38 +01:00
Athanasius
89f2726e48
Set internal and found plugin module_name separately.
...
Settled on `plugins.<internal` and `<plugins>.found` as the format.
2020-07-31 14:46:38 +01:00
Athanasius
ad021e0765
Remove %(class)s from logging format as un-necessary.
...
It was only there to test the code populating it.
2020-07-31 14:46:38 +01:00
Athanasius
beea4ef39b
Remove %(name)s from logging format as un-necessary.
2020-07-31 14:46:38 +01:00
Athanasius
e3b3f1e5b5
Prepend some useful information to %(module)s if caller is a plugin
...
NB: This assumes only one level within the plugin folder, TODO to fix
that.
2020-07-31 14:46:38 +01:00
Athanasius
e572395718
LoggerAdapter can't change anything but %(message)s
2020-07-31 14:46:38 +01:00
Athanasius
04c4f5e683
Using a LoggerAdapter to prepend a string.
...
1. This makes setting up logging everywhere slightly more involved.
2. If I then want to change, say, %(module)s value I'll end up needing
to stack walk again.
So this might be better done in a filter. But these commits for the
record, and to come back to if needs be.
2020-07-31 14:46:38 +01:00
Athanasius
898ff9fbb2
Logging: Make correct loggers for 'found' plugins
...
* Log messages propagate up Parent.Child chains, so we don't need a
channel on the plugin logger.
* But it still needs the filter to define qualname and class for
formatting.
2020-07-31 14:46:38 +01:00
Athanasius
3dab0e9d91
Comment pr-check flake8, and don't --exit-zero the full check
2020-07-31 14:44:44 +01:00
Athanasius
46e9f4253d
Merge pull request #654 from Athanasius/fix/638-annotate-flake8-checks
...
flake8-your-pr annotations fail for any fork branch
2020-07-31 14:21:13 +01:00
Athanasius
4aa841c6e2
Will PY file check work if env.PYFILES not set at all ?
2020-07-31 13:59:52 +01:00
Athanasius
67a13d3869
Change Checkout conditional to direct context, not env vars
2020-07-31 13:56:18 +01:00
Athanasius
e087cd7f85
Comment that 'env' for another commit
2020-07-31 13:53:23 +01:00
Athanasius
ecf4732e44
Check step needs a 'uses' or 'run', so add latter with 'env' for check
2020-07-31 13:51:50 +01:00
Athanasius
1352931465
Remove EDMCLogging.py comment to trigger diff
2020-07-31 13:50:27 +01:00
Athanasius
937dacd7ca
Implement "same owner?" check for base/head
...
* Also updates top comment.
2020-07-31 13:47:40 +01:00
Athanasius
3972abbace
Comment out the current steps
2020-07-31 13:42:00 +01:00
Athanasius
b75e2ec2b1
Comment about the check being wrong
...
This gets the branch rolling for a PR
2020-07-31 13:36:49 +01:00
Athanasius
f2cfa6ca1d
Merge pull request #653 from Athanasius/fix/652-PR-Checks-forked-branch
...
Fixing PR-Checks for forked branches
2020-07-31 13:31:11 +01:00
Athanasius
64e6ad439c
Try remote-add/fetch in separate step
2020-07-31 13:28:28 +01:00
Athanasius
8d7f91248d
Oops, moved the 'steps:' line too
2020-07-31 13:18:46 +01:00
Athanasius
063a83b8e8
Move 'Show github context' to just before flake8
...
$GITHUB_EVENT_PATH wasn't set in the shell with it first.
2020-07-31 13:17:56 +01:00
Athanasius
71fa1dbcf6
Comment the 'add base remote and fetch it'
2020-07-31 13:15:52 +01:00
Athanasius
3d46f23fc7
Need svn_url, not url
...
'url' is api.github.com
2020-07-31 13:07:40 +01:00