Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
strategy:
matrix:
python-version:
- 3.7
- 3.8
- 3.9
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ flake8-future-import
flake8-import-order
flake8-type-checking; python_version >= '3.8'
furo==2022.4.7 # Sphinx theme
pytest~=6.2.5
pytest~=7.1.0
pytest-vcr~=1.0.2
requests-mock~=1.9.3
sphinx>=4,<5
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Communications :: Chat :: Internet Relay Chat",
]
requires-python = ">=3.7"
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ show_error_codes = True

[tool:pytest]
python_files = *.py
addopts = --tb=short
addopts = --tb=short -p no:nose
norecursedirs = contrib
filterwarnings =
ignore::pytest.PytestAssertRewriteWarning
10 changes: 3 additions & 7 deletions sopel/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from __future__ import annotations

import collections
import imp
import importlib
import itertools
import os

Expand Down Expand Up @@ -67,12 +67,8 @@ def find_internal_plugins():
Internal plugins can be found under ``sopel.modules``. This list does not
include the ``coretasks`` plugin.
"""
plugin_dir = imp.find_module(
'modules',
[imp.find_module('sopel')[1]]
)[1]

for name, _ in _list_plugin_filenames(plugin_dir):
modules = importlib.import_module('sopel.modules')
for name, _ in _list_plugin_filenames(modules.__path__[0]):
yield handlers.PyModulePlugin(name, 'sopel.modules')


Expand Down