Giter Club home page Giter Club logo

gogig's People

Contributors

deepsourcebot avatar tech-dex avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gogig's Issues

New Keywords

Words like:
"Front end" , "Dev" are not recognized right now.

(PYL-W0603) `global` statement detected

Description

It is recommended not to use global statement unless it is really necessary. Global variables are dangerous because they can be simultaneously accessed from multiple sections of a program. This frequently results in bugs. This also make code difficult to read, because they force you to search through multiple functions …

Occurrences

There are 3 occurrences of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Tech-Dex/GoGig/issue/PYL-W0603/occurrences/

(PTC-W0048) If statements can be merged

Description

Nested if statements can be collapsed into a single if statement by separating their condition using and operator. Merging collapsible if statements increases the code's readability. ### Not preferred: python if condition1: if condition2: dosomething() ### Preferred: python if condition1 and condition2: dosomething() ### Exception: DeepSource would not …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → deepsource.io/gh/Tech-Dex/GoGig/issue/PTC-W0048/occurrences/

Create a better word search

Use this snippet of code as a start

illegal_char_list = ['.', ',']
for word in text.split(' '):
    for illegal_char in illegal_char_list:
        word = word.replace(illegal_char, '')
    print(word)

Bot breaking bug: asyncprawcore.exceptions.ServerError: received 503 HTTP response

Got this error and broke the bot.

Unhandled exception in internal background task 'search_subreddits'.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/discord/ext/tasks/__init__.py", line 101, in _loop
    await self.coro(*args, **kwargs)
  File "/bot-code/main.py", line 79, in search_subreddits
    async for submission in subreddit.new(limit=10):
  File "/usr/local/lib/python3.9/site-packages/asyncpraw/models/listing/generator.py", line 62, in __anext__
    await self._next_batch()
  File "/usr/local/lib/python3.9/site-packages/asyncpraw/models/listing/generator.py", line 72, in _next_batch
    self._listing = await self._reddit.get(self.url, params=self.params)
  File "/usr/local/lib/python3.9/site-packages/asyncpraw/reddit.py", line 504, in get
    return await self._objectify_request(method="GET", params=params, path=path)
  File "/usr/local/lib/python3.9/site-packages/asyncpraw/reddit.py", line 585, in _objectify_request
    await self.request(
  File "/usr/local/lib/python3.9/site-packages/asyncpraw/reddit.py", line 787, in request
    return await self._core.request(
  File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 363, in request
    return await self._request_with_retries(
  File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 282, in _request_with_retries
    return await self._do_retry(
  File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 202, in _do_retry
    return await self._request_with_retries(
  File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 282, in _request_with_retries
    return await self._do_retry(
  File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 202, in _do_retry
    return await self._request_with_retries(
  File "/usr/local/lib/python3.9/site-packages/asyncprawcore/sessions.py", line 300, in _request_with_retries

Try-catch this 503 Service Unavailable that breaks the bot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.