aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2025-02-07Only pass post_id to the scheulded task, to be clear on intentionsGravatar Chris Lovering-5/+5
2025-02-07Fetch latest help post further up the call stack when looking to archiveGravatar Chris Lovering-4/+2
This ensures that the logic prior to closing also has the updated thread info
2025-01-30Rename class and some constants.Gravatar Steele Farnsworth-10/+8
2025-01-30Add newline before if statement.Gravatar Steele Farnsworth-0/+1
2025-01-30Make parenthetical await expressions their own statements.Gravatar Steele Farnsworth-2/+4
2025-01-30Move functionality for awaiting emoji reactions to its own function.Gravatar Steele Farnsworth-28/+41
2025-01-30Remove tests for deleted behavior.Gravatar Steele Farnsworth-37/+0
Previously, (txt, csv, json, and py) files evoked special behavior from the filtering system. This is no longer the case.
2025-01-30Mark tests that aren't passing with xfail.Gravatar Steele Farnsworth-0/+3
I manually tested the functionality implemented here.
2025-01-30Undo a revertGravatar Steele Farnsworth-1/+162
2025-01-30Revert "Apply filtering to text attachments; offer to auto-upload text ↵Gravatar Steele Farnsworth-180/+44
attachments to paste bin"
2025-01-30Change how a file is determined to be text-like. Decode text with correct ↵Gravatar Steele Farnsworth-3/+4
encoding. Attachments with "charset" in their content type are presumed to be text. The specified charset is always used to decode the text.
2025-01-30Remove messages related to disallowed text-like files.Gravatar Steele Farnsworth-34/+13
These files will be made allowed. Also move `TXT_LIKE_FILES` to the other module that uses it.
2025-01-29Account for messages with attachments being deleted before author reacts.Gravatar Steele Farnsworth-0/+14
Messages might be deleted immediately if the message or the attachment trips a filter, in which case we don't want the user to be able to upload them.
2025-01-29Add logging; expand initial message from bot; fix bug in deleting the paste.Gravatar Steele Farnsworth-3/+18
The expanded initial message tells the user that uploading to the paste bin is for accessibility. I hallucinated that PasteResponse objects have a delete method, which they do not.
2025-01-29Add comments explaining each step.Gravatar Steele Farnsworth-5/+10
2025-01-29Exit early if none of the attachments are text.Gravatar Steele Farnsworth-2/+1
Previously, the bot might have offered to upload the attachments in a message containing only images, and then done nothing.
2025-01-29Move EmbedFileHandler cog to its own moduleGravatar Steele Farnsworth-87/+111
2025-01-29Add helper function for extracting attachment text.Gravatar Steele Farnsworth-1/+8
Implements a somewhat arbitrary limit on how much text content is passed along for filtering, to avoid wasting compute time on large attachments that aren't intended to be read (such as CSVs)
2025-01-19Apply token filters to text attachment content.Gravatar Steele Farnsworth-1/+10
Works by appending text attachment content to message content, and then applying the filters normally.
2025-01-19Migrate to py3.12 typing syntax.Gravatar Steele Farnsworth-9/+5
2025-01-18Add missing arg in help post archive callGravatar Chris Lovering-1/+1
2025-01-18Ensure every path to close a help channel cancels scheduled closesGravatar Chris Lovering-12/+22
2025-01-18!close can also be used by moderators, not just OPGravatar Chris Lovering-1/+1
2025-01-18More specific close message for native closeGravatar Chris Lovering-1/+1
2025-01-18Don't repeat start of close message in every if branchGravatar Chris Lovering-6/+6
2025-01-18Add closing reason for when OP closes uses native Discord close optionGravatar Chris Lovering-1/+4
2025-01-18Change closing embed title based on close reasonGravatar Chris Lovering-1/+10
2025-01-18Significantly shorten help channel close messageGravatar Chris Lovering-2/+2
2025-01-18Remove unneeded constantGravatar Chris Lovering-2/+1
2025-01-18Update supported Python versions in Snekbox help text (#3237)Gravatar Bradley Reynolds-2/+2
2025-01-12Migrate to py3.12 generic syntax (removes TypeVar).Gravatar Steele Farnsworth-4/+1
2025-01-12work-in-progress: when upload a text file attachment, ask for permission to ↵Gravatar Steele Farnsworth-2/+92
auto-upload to pastebin. Also DMs the delete URL to the user. This code will very likely be moved elsewhere before/if it is merged.
2025-01-10Further abbreviate the "wrong language specifier" message; remove extra ↵Gravatar Steele Farnsworth-7/+5
"please".
2025-01-08Abbreviate codeblock instructions; remove ability to dismiss the ↵Gravatar Steele Farnsworth-25/+8
instructions with emoji. The more concise instructions are intended to be easier to read and increase the rate of followthru. That the instructions cannot be dismissed is intended to make them harder to ignore.
2025-01-05Remove unneeded importGravatar Chris Lovering-2/+1
2025-01-04Re-fetch help threads before closing.Gravatar Steele Farnsworth-0/+4
This ensures that the thread title is up-to-date. Previously, even if someone changed the title of the thread, the bot might prepend the lock emoji to an older version of the title.
2025-01-03Bump pydantic-settings from 2.6.1 to 2.7.1 (#3222)Gravatar dependabot[bot]-5/+5
Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.6.1 to 2.7.1. - [Release notes](https://github.com/pydantic/pydantic-settings/releases) - [Commits](https://github.com/pydantic/pydantic-settings/compare/v2.6.1...v2.7.1) --- updated-dependencies: - dependency-name: pydantic-settings dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-03Bump rapidfuzz from 3.10.1 to 3.11.0 (#3223)Gravatar dependabot[bot]-91/+91
Bumps [rapidfuzz](https://github.com/rapidfuzz/RapidFuzz) from 3.10.1 to 3.11.0. - [Release notes](https://github.com/rapidfuzz/RapidFuzz/releases) - [Changelog](https://github.com/rapidfuzz/RapidFuzz/blob/main/CHANGELOG.rst) - [Commits](https://github.com/rapidfuzz/RapidFuzz/compare/v3.10.1...v3.11.0) --- updated-dependencies: - dependency-name: rapidfuzz dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-03Bump pytest-subtests from 0.13.1 to 0.14.1 (#3225)Gravatar dependabot[bot]-7/+7
Bumps [pytest-subtests](https://github.com/pytest-dev/pytest-subtests) from 0.13.1 to 0.14.1. - [Release notes](https://github.com/pytest-dev/pytest-subtests/releases) - [Changelog](https://github.com/pytest-dev/pytest-subtests/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest-subtests/compare/v0.13.1...v0.14.1) --- updated-dependencies: - dependency-name: pytest-subtests dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-03Bump sentry-sdk from 2.19.0 to 2.19.2 (#3224)Gravatar dependabot[bot]-5/+5
Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.19.0 to 2.19.2. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.19.0...2.19.2) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-30Fix rendering of markdown headers in docsGravatar wookie184-1/+2
2024-12-30Remove surrounding whitespace from doc description markdownGravatar wookie184-1/+18
2024-12-30Bump markdownify from 0.13.1 to 0.14.1Gravatar dependabot[bot]-5/+5
Bumps [markdownify](https://github.com/matthewwithanm/python-markdownify) from 0.13.1 to 0.14.1. - [Release notes](https://github.com/matthewwithanm/python-markdownify/releases) - [Commits](https://github.com/matthewwithanm/python-markdownify/compare/0.13.1...0.14.1) --- updated-dependencies: - dependency-name: markdownify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
2024-12-30Bump ruff from 0.8.0 to 0.8.4 (#3220)Gravatar dependabot[bot]-21/+21
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.8.0 to 0.8.4. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.0...0.8.4) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-30Bump pytest from 8.3.3 to 8.3.4 (#3219)Gravatar dependabot[bot]-5/+5
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.3 to 8.3.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/8.3.3...8.3.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-30Bump httpx from 0.27.2 to 0.28.1 (#3218)Gravatar dependabot[bot]-6/+5
Bumps [httpx](https://github.com/encode/httpx) from 0.27.2 to 0.28.1. - [Release notes](https://github.com/encode/httpx/releases) - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md) - [Commits](https://github.com/encode/httpx/compare/0.27.2...0.28.1) --- updated-dependencies: - dependency-name: httpx dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29Bump coverage from 7.6.7 to 7.6.10 (#3217)Gravatar dependabot[bot]-65/+65
Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.6.7 to 7.6.10. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.6.7...7.6.10) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29Bump aiohttp from 3.11.7 to 3.11.11 (#3216)Gravatar dependabot[bot]-79/+79
--- updated-dependencies: - dependency-name: aiohttp dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-29Bump taskipy from 1.14.0 to 1.14.1 (#3206)Gravatar dependabot[bot]-7/+7
Bumps [taskipy](https://github.com/taskipy/taskipy) from 1.14.0 to 1.14.1. - [Release notes](https://github.com/taskipy/taskipy/releases) - [Commits](https://github.com/taskipy/taskipy/compare/1.14.0...1.14.1) --- updated-dependencies: - dependency-name: taskipy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03Heroku is no longer freeGravatar Krypton-1/+1