<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniela Lima</title>
    <description>The latest articles on DEV Community by Daniela Lima (@mrslima).</description>
    <link>https://dev.to/mrslima</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F489797%2F0c096a55-6533-4714-8f51-aac91017fd5a.png</url>
      <title>DEV Community: Daniela Lima</title>
      <link>https://dev.to/mrslima</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrslima"/>
    <language>en</language>
    <item>
      <title>Treasure Hunt: 5 Juicy Repos on GitHub</title>
      <dc:creator>Daniela Lima</dc:creator>
      <pubDate>Sat, 30 Oct 2021 16:01:33 +0000</pubDate>
      <link>https://dev.to/mrslima/treasure-hunt-5-juicy-repos-on-github-ba9</link>
      <guid>https://dev.to/mrslima/treasure-hunt-5-juicy-repos-on-github-ba9</guid>
      <description>&lt;p&gt;(Almost) Everything you need in such a place!&lt;/p&gt;

&lt;p&gt;Ahoy matey! During my sailing in the GitHub sea, I found some amazing lands to dock on. The extra one is mine. And I’d like to invite you to embark on my project.&lt;/p&gt;




&lt;h2&gt;
  
  
  App Ideas
&lt;/h2&gt;

&lt;p&gt;Have you ever wanted to build something, but you had no idea what to do? Just as authors sometimes have “writers block” it’s also true for developers. This list is intended to solve this issue once and for all! &lt;a href="https://github.com/florinpop17/app-ideas"&gt;Go➡&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  These applications are:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;great for improving your coding skills muscle;&lt;/li&gt;
&lt;li&gt;great for experimenting with new technologies new;&lt;/li&gt;
&lt;li&gt;great for adding to your portfolio to impress your next employer/client;&lt;/li&gt;
&lt;li&gt;great for using as examples in tutorials (articles or videos);&lt;/li&gt;
&lt;li&gt;easy to complete and also easily extendable with new features;&lt;/li&gt;
&lt;li&gt;This is not just a simple list of projects, but a collection that describes each project in enough detail so that you can develop it from the ground up!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Each project has the following features:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;A clear and descriptive objective;&lt;/li&gt;
&lt;li&gt;A list of User Stories which should be implemented (these stories act more as a guideline than a forced list of To-Do’s. Feel free to add your own stories if you want);&lt;/li&gt;
&lt;li&gt;A list of bonus features that not only improve the base project, but also your skills at the same time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the resources and links to help you find what you need to complete the project&lt;/p&gt;




&lt;h2&gt;
  
  
  The Book of Secret Knowledge
&lt;/h2&gt;

&lt;p&gt;This repository is a collection of various materials and tools that I use every day in my work. It contains a lot of useful information gathered in one piece. It is an invaluable source of knowledge for me that I often look back on. &lt;a href="https://github.com/trimstray/the-book-of-secret-knowledge"&gt;Go➡&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Awesome Cheatsheets
&lt;/h2&gt;

&lt;p&gt;Awesome cheatsheets for popular programming languages, frameworks and development tools. They include everything you should know in one single file. &lt;a href="https://github.com/LeCoupa/awesome-cheatsheets"&gt;Go➡&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Interview Handbook
&lt;/h2&gt;

&lt;p&gt;No one has time to do a few hundred LeetCode questions. Here’s free and curated technical interview preparation materials for busy engineers, brought to you by the author of the Blind 75 List. &lt;a href="https://github.com/yangshun/tech-interview-handbook"&gt;Go➡&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Besides the usual algorithm questions, other awesome stuff includes:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;How to prepare for coding interviews&lt;/li&gt;
&lt;li&gt;Interview Cheatsheet — Straight-to-the-point Do’s and Don’ts&lt;/li&gt;
&lt;li&gt;Algorithm tips and the best practice questions categorized by topic&lt;/li&gt;
&lt;li&gt;Interview formats of the top tech companies&lt;/li&gt;
&lt;li&gt;Behavioral questions asked by the top tech companies&lt;/li&gt;
&lt;li&gt;Good questions to ask your interviewers at the end of the interviews&lt;/li&gt;
&lt;li&gt;Helpful resume tips to get your resume noticed and the Do’s and Don’ts&lt;/li&gt;
&lt;li&gt;Front-End Interview preparation&lt;/li&gt;
&lt;li&gt;Help from you in contributing content would be very much appreciated!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Why do I want this?
&lt;/h4&gt;

&lt;p&gt;This repository has practical content that covers all phases of a technical interview, from applying for a job to passing the interviews to offer negotiation. Technically competent candidates might still find the non-technical content helpful as well.&lt;/p&gt;

&lt;h4&gt;
  
  
  Who is this for?
&lt;/h4&gt;

&lt;p&gt;Anybody who wants to land a job at a tech company but is new to technical interviews, seasoned engineers who have not been on the other side of the interviewing table in a while and want to get back into the game, or anyone who wants to be better at technical interviewing.&lt;/p&gt;




&lt;h2&gt;
  
  
  E-Book Foundation — Free programming books
&lt;/h2&gt;

&lt;p&gt;This repo contains books, courses, interactive programming, podcasts and more, everything free and also translated to many languages. &lt;a href="https://github.com/EbookFoundation/free-programming-books"&gt;Go➡&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  [Extra] Make Our Lives Easier Again
&lt;/h2&gt;

&lt;p&gt;In this repo, I intend to gather a lot of useful stuff such as books, guides, developer tools and much more. It’s still very primitive yet, but there are some interesting things. &lt;a href="https://github.com/mrslima/Make-Our-Lives-Easier-Again"&gt;Go➡&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jlOrRGXg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/mrslima/makeourliveseasieragain/raw/main/homepage_resources/welcome.jpg" alt="img" width="880" height="352"&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  You may also like
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/mrslima/python-typing-kl4"&gt;Python Typing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/mrslima/12-vs-code-shortcuts-to-code-faster-55m5"&gt;VS Code Shortcuts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Find me around the web: &lt;a href="https://taplink.cc/limaa.ds"&gt;All my links&lt;/a&gt;
&lt;/h4&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>12 VS Code Shortcuts To Code Faster!</title>
      <dc:creator>Daniela Lima</dc:creator>
      <pubDate>Sat, 16 Oct 2021 21:50:38 +0000</pubDate>
      <link>https://dev.to/mrslima/12-vs-code-shortcuts-to-code-faster-55m5</link>
      <guid>https://dev.to/mrslima/12-vs-code-shortcuts-to-code-faster-55m5</guid>
      <description>&lt;p&gt;Some of these tips I took from VS Code documentation. I recommend you to take a look. &lt;a href="https://code.visualstudio.com/docs/getstarted/tips-and-tricks"&gt;📃VS Code docs.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Quick file open: &lt;code&gt;Ctrl + P&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gMm-l9O---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfzbx8ovn6m3qeav15b4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gMm-l9O---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfzbx8ovn6m3qeav15b4.gif" alt="QuickFileOpenPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Show terminal: &lt;code&gt;Ctrl + backtick&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---iOqx5KX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxh7t1gp210hqudnbubk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---iOqx5KX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qxh7t1gp210hqudnbubk.png" alt="ShowTerminalPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Zen mode: &lt;code&gt;Ctrl + K, then Z&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dqaVeybP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vsw29uf09ubedaqfohgz.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dqaVeybP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vsw29uf09ubedaqfohgz.gif" alt="ZenMondePIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Open new editor: &lt;code&gt;Ctrl + \&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gbJSkAZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z36bcwrvpm02zup6qh3e.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gbJSkAZt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z36bcwrvpm02zup6qh3e.gif" alt="SplitEditorPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Switch between editors: &lt;code&gt;Ctrl + 1, Ctrl + 2...&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--izN1D_9q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zivyzlb097qz42tbx6e.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--izN1D_9q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zivyzlb097qz42tbx6e.gif" alt="NavigateEditorPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Multi cursor selection: &lt;code&gt;Alt + Click&lt;/code&gt; or &lt;code&gt;Ctrl + Alt + Up/Down&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9z0KMZoa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjqvww648f1lohqpvr2t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9z0KMZoa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wjqvww648f1lohqpvr2t.gif" alt="MultiCursorPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7. You can also add additional cursors to all occurrences of the current selection: &lt;code&gt;Ctrl + Shift + L&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BJE0oheu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01r2ma37aw67lbfg984v.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BJE0oheu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01r2ma37aw67lbfg984v.gif" alt="AllOcurPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Or if you want to select only the next occurrence: &lt;code&gt;Ctrl + D&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xs-YvBUq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1owbm92ngpbpjjfhovpt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xs-YvBUq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1owbm92ngpbpjjfhovpt.gif" alt="OneByOnePIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Copy line up / down: &lt;code&gt;Shift + Alt + Up/Down&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kTa-pTYU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88q15n4gm13fuxpwqlig.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kTa-pTYU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/88q15n4gm13fuxpwqlig.gif" alt="CopyLinePIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Move line up and down: &lt;code&gt;Alt + Up/Down&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PqieEQm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8widg4jh7twym1wcr333.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PqieEQm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8widg4jh7twym1wcr333.gif" alt="MoveLinePIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  11. Code formatting: &lt;code&gt;Shift + Alt + F&lt;/code&gt; (whole document)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3eR4k3S6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/frsg2yorcx7y17ur2u8h.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3eR4k3S6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/frsg2yorcx7y17ur2u8h.gif" alt="FormatPIC"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  12. Rename: &lt;code&gt;F2&lt;/code&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5-cUCfk9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cuxxm9wm9jmrkw7n7fv5.gif" alt="RenamePIC"&gt;
&lt;/h2&gt;

&lt;p&gt;😎 You might also like:&lt;br&gt;
&lt;a href="https://dev.to/mrslima/python-typing-kl4"&gt;Python Typing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📫 Where to find me:&lt;br&gt;
&lt;a href="http://taplink.cc/limaa.ds"&gt;All my links&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Como usar o Google americano (pesquisa em inglês)</title>
      <dc:creator>Daniela Lima</dc:creator>
      <pubDate>Fri, 08 Oct 2021 20:38:52 +0000</pubDate>
      <link>https://dev.to/mrslima/como-usar-o-google-americano-pesquisa-em-ingles-46f2</link>
      <guid>https://dev.to/mrslima/como-usar-o-google-americano-pesquisa-em-ingles-46f2</guid>
      <description>&lt;h4&gt;
  
  
  Altere sua busca para qualquer região.
&lt;/h4&gt;




&lt;p&gt;Quando fazemos uma pesquisa em outro idioma, a maioria dos resultados que recebemos são em português e relacionados com o nosso país. Entretanto, nós queremos, por exemplo, resultados em inglês e relacionados com os EUA. Como fazer isso?&lt;/p&gt;

&lt;p&gt;Para fazer pesquisas em outros idiomas e/ou acessar o Google de determinado país, basta alterar a sua região nas configurações do próprio Google. Isso pode ser feito em qualquer navegador de internet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Siga os passos abaixo:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;No canto inferior direito, clique em 'Configurações' e, em seguida, em 'Configurações de Pesquisa'.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz3s01ve20d4ykt76ojya.jpg" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Em 'Resultados da pesquisa', role para baixo da página, encontre 'Configurações de região', selecione o país desejado e salve.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa98dusys8sb2xcf26j9r.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Considere seguir este perfil para mais postagens como essa!
&lt;/h2&gt;

&lt;p&gt;Outros conteúdos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/mrslima/python-typing-kl4"&gt;Python Typing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tutorial</category>
      <category>beginners</category>
      <category>braziliandevs</category>
    </item>
    <item>
      <title>Python Typing</title>
      <dc:creator>Daniela Lima</dc:creator>
      <pubDate>Thu, 30 Sep 2021 23:51:53 +0000</pubDate>
      <link>https://dev.to/mrslima/python-typing-kl4</link>
      <guid>https://dev.to/mrslima/python-typing-kl4</guid>
      <description>&lt;p&gt;Annotations &amp;amp; Type Hints for Python 3.5 or above.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DISCLAIMER: It’s a “detailed summary”. Everything here came from Tech With Tim video about Python Typing. I’m making this post for my learning, also to store in a place I can keep checking every time I need. All credit should go to Tim and his excellent explanation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=QORvB-_mbZ0"&gt;Tim's video.&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Why do that?
&lt;/h3&gt;

&lt;p&gt;It’s just to better documenting your code, to make it easier for autocomplete, and for other developers to understand what to pass. Therefore, it doesn’t change the functionality of your code. If you pass an &lt;em&gt;int&lt;/em&gt; instead of the expected str, it &lt;strong&gt;won’t&lt;/strong&gt; crash.&lt;/p&gt;




&lt;h4&gt;
  
  
  Static Code Analysis Tool (MYPY)
&lt;/h4&gt;

&lt;p&gt;Tool to verify type mismatch — catch errors before running your code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pip install mypy

Usage:
$ mypy /../Path/your_file.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;In Python, you might already know, we don’t have to define the types of our variables, functions, parameters, etc. We can just write it. However, in a lot of other programming languages that are static and strongly typed, you need to declare the type of the variable before you can assign a value to it. And then that variable can only hold that type throughout the entire program execution.&lt;/p&gt;

&lt;p&gt;For example, in other languages, if you declare an &lt;em&gt;int&lt;/em&gt; and give it a str, &lt;code&gt;int x = “hello”&lt;/code&gt; , it’s going to crash.&lt;/p&gt;

&lt;p&gt;But in Python, since it’s dynamically typed, we can just do &lt;code&gt;x = 1&lt;/code&gt;.&lt;/p&gt;

&lt;h5&gt;
  
  
  Variable hint/annotation:
&lt;/h5&gt;

&lt;p&gt;For &lt;code&gt;x: str = 1&lt;/code&gt;, this is not enforcing that &lt;code&gt;x&lt;/code&gt; store a string, it means that &lt;code&gt;x&lt;/code&gt; should store one. Therefore, it won’t crash, because it’s simply documentation — doesn’t change the code behavior.&lt;/p&gt;

&lt;p&gt;For &lt;code&gt;x: str = 1&lt;/code&gt; it returns:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;error: Incompatible types in assignment (expression has type "int", variable has type "str")
Found 1 error in 1 file (checked 1 source file)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Parameter annotation:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def something(numb: float) -&amp;gt; int:
    return 2021 + numb

OR if you don't return anything, just use None

def person(name: str, age: int, height: float) -&amp;gt; None:
    print(f'{name} is {age} yo and {height} feet tall.')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;numb: float&lt;/code&gt; means it should receive a &lt;em&gt;float&lt;/em&gt; and &lt;code&gt;-&amp;gt; int&lt;/code&gt; should return an &lt;em&gt;int&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Some advanced types:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  List Type:
&lt;/h4&gt;

&lt;p&gt;So a lot of times you have some, well, more advanced or more complicated types that you want to pass as an argument to a function. For example, maybe we want to have a list that has other three list in it. And these lists all have &lt;em&gt;int&lt;/em&gt; inside them. Well, what is the type for that?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[[1, 2], [3, 4], [5, 6]]
x: list[list[int] = []

No no no... This doesn't work!

&amp;gt;&amp;gt;&amp;gt; TypeError: 'type' object is not subscriptable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For that, we need to import the List type from the typing module.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import List

x: List[List[int] = [[1, 2], 3, 4]]    with capital L

$ mypy ../this_file.py
&amp;gt;&amp;gt;&amp;gt; Success: no issues found in 1 source file.

And now it's a valid type.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Dictionary Type:
&lt;/h4&gt;

&lt;p&gt;Same for dictionaries, but now we just need to specify the key and the value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Dict

x: Dict[str: str] = {"State": "Capital"}    with capital C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Set Type:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Set

x: Set[str] = {"a", "b", "c"}    with capital C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Custom Type:
&lt;/h4&gt;

&lt;p&gt;This is my vector type. So now that I’ve done this, I can use vector and wherever I use vector list &lt;em&gt;float&lt;/em&gt; will kind of be replaced there.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import List, Dict, Set

Vector = List[float]

def foo(v: Vector) -&amp;gt; Vector:
    print(v)

Autocomplete would be: foo(v: List[float]) -&amp;gt; List[float]

Where there’s Vector, List[float] will replace it.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can store a type inside a variable and use a variable as a type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vectors = List[Vector]    (List[List[float]])

def foo(v: Vectors) -&amp;gt; Vector:
    pass

Autocomplete would be: foo(v: List[List[float]]) -&amp;gt; List[float]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Optional Type:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def foo(output: bool=False):
    pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything is fine here — no errors. However, the autocomplete (foo(). Ctrl+Space) doesn’t show the type because it’s output optional. But to make this the most correct type that it can be, you need to specify that it’s optional.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Optional

def foo(output: Optional[bool]=False):
    pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Any Type:
&lt;/h4&gt;

&lt;p&gt;This is very straightforward. But if you are willing to accept anything, then just use the any type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Any

def foo(output: Any):
    pass

Writing this is the exact same thing as just doing def foo(output)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because if you don’t give it a type, it’s assumed it could be anything. This is just being more explicit. You’re saying this is intended to actually accept anything.&lt;/p&gt;

&lt;h4&gt;
  
  
  Sequence Type:
&lt;/h4&gt;

&lt;p&gt;So a lot of times when you are writing a function, in Python, you want one of the parameters to be anything that’s a sequence, you don’t care what type of sequence it is. You just want it to be a sequence.&lt;/p&gt;

&lt;p&gt;You’ll be needing this there’s no way to specify, if the parameter should be a &lt;em&gt;list&lt;/em&gt; or a &lt;em&gt;tuple&lt;/em&gt;. However, if you use sequence, you’re saying that both the &lt;em&gt;tuple&lt;/em&gt; and the &lt;em&gt;list&lt;/em&gt; count as a sequence. And you can also specify what type the sequence should store.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Sequence

def foo(seq: Sequence[str]):
    pass

foo(("a", "b", "c"))
foo(["a", "b", "c"])
foo("hello")    ("Strings are immutable sequences of Unicode")

$ mypy ../this_file.py
&amp;gt;&amp;gt;&amp;gt; Success: no issues found in 1 source file.

But if you give an *int* or a *set*:

foo(1)
foo({1, 2, 3})
str: "anything that can be indexed"

$ mypy ../this_file.py
&amp;gt;&amp;gt;&amp;gt; error: Argument 1 to "foo" has incompatible type "int"; expected "Sequence"
Found 1 error in 1 file (checked 1 source file)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Tuple Type:
&lt;/h4&gt;

&lt;p&gt;It’s a little different of the list, so what you need to do is specify what is going to be stored at every single position in the tuple.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Tuple

x: Tuple[int] = (1, 2, 3)

$ mypy ../this_file.py
&amp;gt;&amp;gt;&amp;gt; error: Incompatible types in assignment (expression has type "Tuple[int, int, inti]", variable ha type "Tuple[int]
Found 1 error in 1 file (checked 1 source file)

x: Tuple[int, int, int] = (1, 2, 3)
y: Tuple[int, str, int] = (5, "hello", 10)

$ mypy ../this_file.py
&amp;gt;&amp;gt;&amp;gt; Success: no issues found in 1 source file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Callable Type:
&lt;/h4&gt;

&lt;p&gt;This is what you use when you want to accept a function as parameter. Well, the proper type for this function would be callable. And then, in square brackets, define the parameters that the callable function is going to have, as well as the return type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import Callable

                     |parameters|return|
def foo(func: Callable[[int, int], int] -&amp;gt; None:
    func(1, 3)

This function has to have two *int* parameters and return an int

def add(x: int, y: int) -&amp;gt; int:
    return x + y

def foo(func: Callable[[int, int], int]) -&amp;gt; None:
    func(1, 3)

foo(add)

$ mypy ../this_file.py
&amp;gt;&amp;gt;&amp;gt; Success: no issues found in 1 source file.

But if we remove or add one parameter, we get an error because this function doesn't have the correct parameters inside.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To return a Callable Function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def foo() -&amp;gt; Callable[[int, int], int]:
    def add(x: int, y: int) -&amp;gt; int:
        return x + y
return add

foo()

OR with lambda

# normal
def foo() -&amp;gt; Callable[[int, int], int]:
    return lambda x, y: x + y

# variables specified
def foo() -&amp;gt; Callable[[int, int], int]:
    func: Callable[[int, int], int] = lambda x, y: x + y
    return func

foo()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;They are all fine.&lt;/p&gt;

&lt;h5&gt;
  
  
  For more advanced, General Type, check: &lt;a href="https://www.youtube.com/watch?v=QORvB-_mbZ0&amp;amp;t=1298s"&gt;https://www.youtube.com/watch?v=QORvB-_mbZ0&amp;amp;t=1298s&lt;/a&gt; &lt;em&gt;(timestamp already in the link)&lt;/em&gt;
&lt;/h5&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>codequality</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
