diff options
author | 2021-04-19 18:24:44 +0800 | |
---|---|---|
committer | 2021-04-19 18:24:44 +0800 | |
commit | d19d30fedc369c70c5859724959d5285fb2beea0 (patch) | |
tree | 98758cc9c81780935cb0083bfc0283c4d3ce39d9 /pydis_site | |
parent | Remove duplicate images. (diff) |
Improve markdown whitespace.
Replace double trailing whitespaces with <br> tags to prevent certain
editors from automatically stripping the necessary space.
Remove any extra single whitespace.
Diffstat (limited to 'pydis_site')
15 files changed, 69 insertions, 67 deletions
diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md index 321e9b5d..f8baa354 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing.md @@ -95,7 +95,7 @@ If you don't understand anything or need clarification, feel free to ask any sta ### Useful Resources -[Style Guide](./style-guide/) - Information regarding the code styles you should follow when working on our projects. +[Style Guide](./style-guide/) - Information regarding the code styles you should follow when working on our projects.<br> [Review Guide](../code-reviews-primer/) - A guide to get you started on doing code reviews. ## Contributors Community diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md index 98ee5e2f..a48b7300 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/bot.md @@ -64,7 +64,7 @@ If your bot fails to start with a `PrivilegedIntentsRequired` exception, this in ### Server Setup -Setup categories, channels, emojis, roles, and webhooks in your server. To see what needs to be added, please refer to the following sections in the `config-default.yml` file: +Setup categories, channels, emojis, roles, and webhooks in your server. To see what needs to be added, please refer to the following sections in the `config-default.yml` file: * `style.emojis` * `guild.categories` @@ -73,7 +73,7 @@ Setup categories, channels, emojis, roles, and webhooks in your server. To see w * `guild.webhooks` We understand this is tedious and are working on a better solution for setting up test servers. -In the meantime, [here](https://discord.new/zmHtscpYN9E3) is a template for you to use. +In the meantime, [here](https://discord.new/zmHtscpYN9E3) is a template for you to use.<br> --- # Configure the bot @@ -105,7 +105,7 @@ The following is a list of all available environment variables used by the bot: | `BOT_API_KEY` | When running bot without Docker | Used to authenticate with the site's API. When using Docker to run the bot, this is automatically set. By default, the site will always have the API key shown in the example below. | | `REDDIT_CLIENT_ID` | reddit cog | OAuth2 client ID for authenticating with the [reddit API](https://github.com/reddit-archive/reddit/wiki/OAuth2). | | `REDDIT_SECRET` | reddit cog | OAuth2 secret for authenticating with the reddit API. *Leave empty if you're not using the reddit API.* | -| `BOT_SENTRY_DSN` | When connecting the bot to sentry | The DSN of the sentry monitor. | +| `BOT_SENTRY_DSN` | When connecting the bot to sentry | The DSN of the sentry monitor. | | `REDIS_PASSWORD` | When not using FakeRedis | The password to connect to the redis database. *Leave empty if you're not using REDIS.* | --- @@ -133,7 +133,7 @@ The bot can run with or without Docker. When using Docker, the site, which is a prerequisite, can be automatically set up too. If you don't use Docker, you have to first follow [the site guide](../site/) to set it up yourself. The bot and site can be started using independent methods. -For example, the site could run with Docker and the bot could run directly on your system (AKA the _host_) or vice versa. +For example, the site could run with Docker and the bot could run directly on your system (AKA the _host_) or vice versa. ## Run with Docker diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/docker.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/docker.md index b29097fd..e7ff7e96 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/docker.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/docker.md @@ -46,10 +46,10 @@ $ sudo systemctl enable docker ```shell ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running? ``` -**Problem** +**Problem**<br> Your Docker service is either not started, or you haven't yet installed Docker. -**Solution** +**Solution**<br> [Start the service](#run-the-service) or ensure it's installed. If it's not, [install it](#docker-installation). @@ -58,10 +58,10 @@ If it's not, [install it](#docker-installation). WARNING: Error loading config file: /home/user/.docker/config.json - stat /home/user/.docker/config.json: permission denied ``` -**Problem** +**Problem**<br> You initially ran Docker using `sudo` before adding your user to the `docker` group, resulting in your `~/.docker/` directory being created with incorrect permissions. -**Solution** +**Solution**<br> Remove the existing `~/.docker/` directory. It will be automatically re-created with the correct permissions. ### Drive has not been shared (Windows users) @@ -70,10 +70,10 @@ When attempting to run the `docker-compose up` command on a Windows machine, you ```text ERROR: for bot_bot_1 Cannot create container for service bot: b'Drive has not been shared' ``` -**Problem** +**Problem**<br> Windows has not been configured to share drives with Docker. -**Solution** +**Solution**<br> > NOTE: Solution requires Windows user credentials for an account that has administrative privileges. 1. Right-click the Docker icon in the Windows system tray, and choose "Settings" from the context menu. diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/forking-repository.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/forking-repository.md index c029760c..b8478269 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/forking-repository.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/forking-repository.md @@ -9,7 +9,7 @@ The following will use the [Sir-Lancebot](https://github.com/python-discord/sir- 1. Navigate to the repository page and press the `Fork` button at the top of the page.  -2. Fork it to your account. +2. Fork it to your account.<br>  3. Later, you will need the Git URL of your forked repository in order to clone it. In your newly forked repository, copy the Git URL by clicking the green `Code` button, then click the Copy Link button. diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/issues.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/issues.md index b29391e5..3ec8ec69 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/issues.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/issues.md @@ -18,13 +18,13 @@ Often, an Issue ticket already exists within the scope of what you might be cons If you don't see one existing, then: -Click the `Issues` tab in a repository: +Click the `Issues` tab in a repository:<br>  -Click `New Issue`: +Click `New Issue`<br>  -Enter the title and description for your issue, then click `Submit new issue`: +Enter the title and description for your issue, then click `Submit new issue`<br> {: width="600" } ## What should I put as a title? diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/style-guide.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/style-guide.md index 543b0cb6..f9962990 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/style-guide.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/style-guide.md @@ -7,7 +7,7 @@ icon: fab fa-python > A style guide is about consistency. > Consistency with this style guide is important. > Consistency within a project is more important. -> Consistency within one module or function is the most important. +> Consistency within one module or function is the most important. > However, know when to be inconsistent -- sometimes style guide recommendations just aren't applicable. > When in doubt, use your best judgment. Look at other examples and decide what looks best. And don't hesitate to ask! @@ -155,7 +155,7 @@ Docstrings that require multiple lines instead keep both sets of triple quotes o def exponent(base, exponent=2): """ Calculate the base raised to the exponents power. - + Default is 2 due to a squared base being the most common usage at this time. """ return a ** b @@ -183,12 +183,12 @@ Imperative mood and present tense usage is preferenced when writing docstrings. Imperative mood is a certain grammatical form of writing that expresses a clear command to do something. -**Use:** "Build an information embed." +**Use:** "Build an information embed."<br> **Don't use:** "Returns an embed containing information." Present tense defines that the work being done is now, in the present, rather than in the past or future. -**Use:** "Build an information embed." +**Use:** "Build an information embed."<br> **Don't use:** "Built an information embed." or "Will build an information embed." # Type Annotations diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git.md index c0f55053..26c89b56 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git.md @@ -7,8 +7,8 @@ icon: fab fa-git-alt Working with git can be daunting, but it is a powerful tool for collaboration and version control. Below are links to regular workflows for working with Git using PyCharm or the CLI. -> **What's the difference?** -> The integrated Git tool built into PyCharm offers a more visual and abstract way to use Git to manage your files. +> **What's the difference?**<br> +> The integrated Git tool built into PyCharm offers a more visual and abstract way to use Git to manage your files.<br> > However, the CLI offers more minute control and functionality compared to the GUI, which may not always do exactly what you want. * [**Working with Git in PyCharm**](./pycharm) diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git/pycharm.md b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git/pycharm.md index c38e5f62..b3b5786e 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git/pycharm.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/contributing/working-with-git/pycharm.md @@ -26,9 +26,9 @@ The following will use the [Sir-Lancebot](https://github.com/python-discord/sir- > Generally, a *remote* designates a repository that is on GitHub or another external location rather than on your computer. The `origin` remote will refer to your fork on GitHub. The `upstream` remote will refer to the main repository on GitHub. -1. In the menu bar, navigate to `Git` -> `Remotes...`. +1. In the menu bar, navigate to `Git` -> `Remotes...`.<br>  -2. In the popup menu, click the `+` icon, set `upstream` as the name, set the URL as the URL for the main repository on GitHub. +2. In the popup menu, click the `+` icon, set `upstream` as the name, set the URL as the URL for the main repository on GitHub.<br>  3. Click `OK`. @@ -37,11 +37,11 @@ The following will use the [Sir-Lancebot](https://github.com/python-discord/sir- ## Creating a New Branch > You will be committing your changes to a new branch rather than to `main`. Using branches allows you to work on multiple pull requests at the same time without conflicts. -> You can name your branch whatever you want, but it's recommended to name it something succint and relevant to the changes you will be making. +> You can name your branch whatever you want, but it's recommended to name it something succint and relevant to the changes you will be making. > Before making new branches, be sure to checkout the `main` branch and ensure it's up to date. -1. In the bottom right corner, click on `main` and then click `New Branch`. +1. In the bottom right corner, click on `main` and then click `New Branch`.<br>  --- @@ -56,7 +56,7 @@ The flow of making a commit is as follows: 1. Select the files you wish to commit. 2. Write a brief description of what your commit is. This is your *commit message*. 3. See the actual changes your commit will be making, and optionally tick/untick specific changes to only commit the changes you want. -4. Click `Commit`. +4. Click `Commit`.<br>  --- @@ -64,6 +64,7 @@ The flow of making a commit is as follows: ## Pushing Changes When you are ready to have your commits be available in your remote fork, navigate to `Git` -> `Push...`. Select the commits you want to push, make sure the remote branch is your intended branch to push to, and click `Push`. +  --- @@ -72,4 +73,5 @@ Select the commits you want to push, make sure the remote branch is your intende > Sometimes you want to update your repository with changes from GitHub. This could be the case if you were working on the pull request on two different computers and one of them has an outdated local repository. To do that, navigate to `Git` -> `Pull...`. From there, select the *remote* and the branches to pull from, then click `Pull`. +  diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/helping-others.md b/pydis_site/apps/content/resources/guides/pydis-guides/helping-others.md index 8590667d..0c3dc7ee 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/helping-others.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/helping-others.md @@ -63,7 +63,7 @@ At other times, it might not be as obvious, and it might be a good idea to kindl The path is often more important than the answer. Your goal should primarily be to allow the helpee to apply, at least to a degree, the concepts you introduce in your answer. Otherwise, they might keep struggling with the same problem over and over again. -That means that simply showing your answer might close the help channel for the moment, but won't be very helpful in the long-term. +That means that simply showing your answer might close the help channel for the moment, but won't be very helpful in the long-term. A common approach is to walk the helpee through to an answer: @@ -74,9 +74,9 @@ A common approach is to walk the helpee through to an answer: > #### Example 3: > -> **user**: "Hey, how can I create a sudoku solver?" -> *helper1 proceeds to paste 40 lines of sudoku solving code* -> **helper2**: "Are you familiar with lists / recursion / backtracking?" +> **user**: "Hey, how can I create a sudoku solver?"<br> +> *helper1 proceeds to paste 40 lines of sudoku solving code*<br> +> **helper2**: "Are you familiar with lists / recursion / backtracking?"<br> > *helper2 proceeds to give the information the user lacks* > > With the first replier, there's a much smaller chance of the helpee understanding how the problem was solved, and gaining new tools for future projects. @@ -100,13 +100,13 @@ Presenting a solution that is considered a bad practice might be useful in certa > #### Example 4: > -> **user**: "How can I print all elements in a list?" -> **helper1**: "You can do it like so:" +> **user**: "How can I print all elements in a list?"<br> +> **helper1**: "You can do it like so:"<br> > > for element in your_list: > print(element) > -> **helper2**: "You can also do it like this:" +> **helper2**: "You can also do it like this:"<br> > > for i in range(len(your_list)): > print(your_list[i]) diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md index 726cb7b2..716250b1 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/how-to-contribute-a-page.md @@ -169,7 +169,7 @@ path = os.path.join("foo", "bar") ### HTML Attributes To add HTML attributes to certain lines/paragraphs, [see this page](https://python-markdown.github.io/extensions/attr_list/#the-list) for the format and where to put it. -This can be useful for setting the image size when adding an image using markdown (see the [Image Captions](#image-captions) section for an example), or for adding bulma styles to certain elements (like the warning notification [here](/pages/guides/pydis-guides/contributing/sir-lancebot#setup-instructions)). +This can be useful for setting the image size when adding an image using markdown (see the [Image Captions](#image-captions) section for an example), or for adding bulma styles to certain elements (like the warning notification [here](/pages/guides/pydis-guides/contributing/sir-lancebot#setup-instructions)).<br> **This should be used sparingly, as it reduces readability and simplicity of the article.** --- diff --git a/pydis_site/apps/content/resources/guides/pydis-guides/off-topic-etiquette.md b/pydis_site/apps/content/resources/guides/pydis-guides/off-topic-etiquette.md index 73ce37bb..f8031834 100644 --- a/pydis_site/apps/content/resources/guides/pydis-guides/off-topic-etiquette.md +++ b/pydis_site/apps/content/resources/guides/pydis-guides/off-topic-etiquette.md @@ -16,7 +16,7 @@ To facilitate the best experience for everyone, here are some guidelines on conv * There are better places to share memes; if you have a meme you think is worth sharing, try to find a relevant subreddit, like [/r/ProgrammerHumor](https://www.reddit.com/r/ProgrammerHumor/). 3. Don't snap at people * We are a large, diverse community. Different native languages, experiences, and ages mean miscommunications happen. Always try to assume the best in other community members. - + ## Three things you should do 1. Ask away * If you have a question that isn't about Python, just ask it in an inactive off-topic channel. @@ -28,5 +28,5 @@ To facilitate the best experience for everyone, here are some guidelines on conv Text isn't necessarily the easiest way for everyone to communicate, so it makes life easier if we're all on the same page. 3. Join in! * The off-topic channels have lots of fun or interesting conversations; if someone is talking about something you're interested in, don't be scared to hop into the conversation. - + While you can discuss other topics than Python in the off-topic channels, the [ordinary rules](/pages/rules/) still apply. diff --git a/pydis_site/apps/content/resources/guides/python-guides/discordpy.md b/pydis_site/apps/content/resources/guides/python-guides/discordpy.md index 93e43867..0dbac1c5 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/discordpy.md +++ b/pydis_site/apps/content/resources/guides/python-guides/discordpy.md @@ -15,7 +15,7 @@ toc: 2 Interest in creating a Discord bot is a common introduction to the world of programming in our community. Using it as your first project in programming while trying to learn is a double-edged sword. -A large number of concepts need to be understood before becoming proficient at creating a bot, making the journey of learning and completing the project more arduous than more simple projects designed specifically for beginners. +A large number of concepts need to be understood before becoming proficient at creating a bot, making the journey of learning and completing the project more arduous than more simple projects designed specifically for beginners. However in return, you get the opportunity to expose yourself to many more aspects of Python than you normally would and so it can be an amazingly rewarding experience when you finally reach your goal. Another excellent aspect of building bots is that it has a huge scope as to what you can do with it, almost only limited by your own imagination. @@ -64,7 +64,7 @@ Be sure to update the token you're using for your bot script to this new one, as Discord Permissions are typically represented by a Permissions Integer which represents all the Permissions that have been allowed. -You can find a reference to all the available Discord Permissions, their bitwise values and their descriptions here: +You can find a reference to all the available Discord Permissions, their bitwise values and their descriptions here:<br> [https://discordapp.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags](https://discordapp.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags) If you want to create your own Permissions Integer, you can generate it in the `Bot` settings page of your Application, located at the bottom of the page. @@ -78,7 +78,7 @@ Bot's cannot use a server invite link. Instead, they have to be invited by a mem The Bot Invite URL is formatted like: `https://discordapp.com/oauth2/authorize?client_id={CLIENT_ID}&scope=bot&permissions={PERMISSIONS_INTEGER}` -You can create the Invite URL for your bot by replacing: +You can create the Invite URL for your bot by replacing: * `{CLIENT_ID}` with your [Client ID](#client-id) * `{PERMISSIONS_INTEGER}` with the [Permissions Integer](#permissions-integer) @@ -97,7 +97,7 @@ Below are the essential resources to read over to get familiar with the basic fu ## Using the Commands Extension (`commands.Bot`) { data-toc-label="Using the Commands Extension" } The Commands Extension has a explanatory documentation walking you through not only what it is and it's basic usage, but also more advanced concepts. -Be sure to read the prose documentation in full at: +Be sure to read the prose documentation in full at:<br> [https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html](https://discordpy.readthedocs.io/en/latest/ext/commands/commands.html) It fully covers: @@ -135,8 +135,8 @@ The most commonly referenced examples are: ### Community Examples and Resources -The `discord.py` developer community over time have shared examples and references with each other. -The following are a collated list of the most referenced community examples. +The `discord.py` developer community over time have shared examples and references with each other.<br> +The following are a collated list of the most referenced community examples. #### Extensions / Cogs * [Extension/Cog Example](https://gist.github.com/EvieePy/d78c061a4798ae81be9825468fe146be) - *Credit to EvieePy* @@ -147,7 +147,7 @@ The following are a collated list of the most referenced community examples. #### Embeds * [Embed Live Designer and Visualiser](https://leovoel.github.io/embed-visualizer/) - *Credit to leovoel* -* [Embed Element Reference](https://cdn.discordapp.com/attachments/84319995256905728/252292324967710721/embed.png) +* [Embed Element Reference](https://cdn.discordapp.com/attachments/84319995256905728/252292324967710721/embed.png)<br> {: width="200" } ##### Using Local Images in Embeds @@ -189,7 +189,7 @@ await messagable.send(file=f, embed=embed) - [PIL Image Processing Example Cog](https://gist.github.com/Gorialis/e89482310d74a90a946b44cf34009e88) - *Credit to Gorialis* ### Systemd Service -**botname.service** +**botname.service**<br> ```ini [Unit] Description=My Bot Name @@ -206,25 +206,25 @@ Restart=on-failure WantedBy=network-online.target ``` -**Directory** +**Directory**<br> `/usr/local/lib/systemd/system` -**Service Commands** -Refresh systemd after unit file changes: +**Service Commands**<br> +Refresh systemd after unit file changes:<br> `systemctl daemon-reload` -Set service to start on boot: +Set service to start on boot:<br> `systemctl enable botname` -Start service now: +Start service now:<br> `systemctl start botname` -Stop service: -`systemctl stop botname` +Stop service:<br> +`systemctl stop botname` -**Viewing Logs** -All logs: +**Viewing Logs**<br> +All logs:<br> `journalctl -u botname` -Recent logs and continue printing new logs live: +Recent logs and continue printing new logs live:<br> `journalctl -fu mybot` diff --git a/pydis_site/apps/content/resources/guides/python-guides/parameters-and-arguments.md b/pydis_site/apps/content/resources/guides/python-guides/parameters-and-arguments.md index 94d4609b..19b2752d 100644 --- a/pydis_site/apps/content/resources/guides/python-guides/parameters-and-arguments.md +++ b/pydis_site/apps/content/resources/guides/python-guides/parameters-and-arguments.md @@ -13,7 +13,7 @@ The function definition uses parameters, whereas the function call uses argument ```python def foo(this_is_a_parameter): print(this_is_a_parameter) - + foo(this_is_an_argument) ``` @@ -25,7 +25,7 @@ A function call may contain a mixture of positional and keyword arguments, and� ```python def foo(a, b, c): print(a, b, c) - + >>> foo(1, 2, 3) 1 2 3 ``` @@ -85,7 +85,7 @@ SyntaxError: positional argument follows keyword argument # Default Parameter Values -Although the syntax is similar, these are not to be confused with keyword arguments. +Although the syntax is similar, these are not to be confused with keyword arguments.<br> Default parameter values appear within the function definition and allow us to conveniently set a default value. This means that if any argument is omitted, its default value will be used as the argument. ```python @@ -134,7 +134,7 @@ def foo(a=0, b=0, /, c=0, d=0): print(a, b, c, d) ``` -The parameters defined before the bare `/` are now considered to be positional-only and keyword mapping will no longer work on them. +The parameters defined before the bare `/` are now considered to be positional-only and keyword mapping will no longer work on them.<br> In the above function definition `a` and `b` are now positional-only parameters. These function calls will still work: @@ -220,7 +220,7 @@ The parameters defined after the bare `*` are now considered to be keyword-only. ```python def foo(a=0, b=0, /, c=0, *, d=0): print(a, b, c, d) - + >>> foo() 0 0 0 0 @@ -240,8 +240,8 @@ Although `c` can be either a positional or keyword argument, if we attempt to pa >>> foo(1, 2, 3, 4) TypeError: foo() takes from 0 to 3 positional arguments but 4 were given ``` - -At least one named parameter must be provided after a bare `*` parameter. + +At least one named parameter must be provided after a bare `*` parameter. Writing a function definition similar to what is shown below would not make sense, as without the context of a named parameter the bare `*` can simply be omitted. ```python @@ -249,12 +249,12 @@ def foo(a=0, *, **kwargs): ^ SyntaxError: named arguments must follow bare * ``` - + ### Q: Why is this useful? The main benefit of using keyword-only parameters is when they are used together with positional-only parameters to remove ambiguity. -However, it may sometimes also be desirable to use keyword-only arguments on their own. +However, it may sometimes also be desirable to use keyword-only arguments on their own.<br> If we were to expose a function as part of an API, we may want the parameter names to carry explicit meaning. Without using keyword names when invoking the function it can be unclear as to what the provided arguments are for. @@ -263,7 +263,7 @@ Additionally, a user could also choose to interchange positional arguments with ```python def update(identity=None, name=None, description=None): # handle the parameters - + >>> update("value 1", "value 2", "value 3") >>> update(1234, "value 1", description="value 2") @@ -274,7 +274,7 @@ Enforcing the keyword names is clearer, as it carries context without needing to ```python def update(*, identity=None, name=None, description=None): # handle the parameters - + >>> update(identity=1234, name="value 1", description="value 2") ``` diff --git a/pydis_site/apps/content/resources/server-info/roles.md b/pydis_site/apps/content/resources/server-info/roles.md index c5c3a7a2..716f5b1e 100644 --- a/pydis_site/apps/content/resources/server-info/roles.md +++ b/pydis_site/apps/content/resources/server-info/roles.md @@ -24,7 +24,7 @@ There are multiple requirements listed there for getting the role. # Server Support Roles ### <span class="fas fa-circle" style="color:#55cc6c"></span> Contributors -**Description:** A role given by staff to people who make substantial contributions to any of the server's [open source repositories](https://github.com/python-discord/) (Sir Lancebot, Python, the site, the branding repo, etc..). +**Description:** A role given by staff to people who make substantial contributions to any of the server's [open source repositories](https://github.com/python-discord/) (Sir Lancebot, Python, the site, the branding repo, etc..).<br> This includes writing pull requests for open issues, and also for reviewing open pull requests (**we really need reviewers!**) **How to get it:** Contribute to the projects! diff --git a/pydis_site/apps/content/resources/server-info/staff-role-expectations.md b/pydis_site/apps/content/resources/server-info/staff-role-expectations.md index e3e3cfdd..286386d7 100644 --- a/pydis_site/apps/content/resources/server-info/staff-role-expectations.md +++ b/pydis_site/apps/content/resources/server-info/staff-role-expectations.md @@ -60,7 +60,7 @@ Having some kind of consistent activity helps moderators bond with the rest of t First of all, it's important to appreciate that everything staff members do in this community is voluntary and the expectations listed above are not meant to change that. **This means it's absolutely fine for all staff members to take breaks or vacations from their activities in the community when they need to.** We will never hold it against someone if they are temporarily away from their responsibilities. - + At the same time, it's only natural for a community like ours that there's some amount of staff turnover as personal interests and circumstances change. Going forward, we will periodically review the activity of individual staff members and open a dialogue with staff members who are currently not meeting the expectations to see what can be done. It might happen that we come to conclusion that it's better for a staff member to step down from their current position. |